Welcome to little lamb

Code » comain » commit ee02cb6

Fix mkdoc & not rebuilding upon src update

author Olivier Brunel
2023-06-20 07:30:42 UTC
committer Olivier Brunel
2023-06-28 16:07:22 UTC
parent ed12b37958732b9b9e33037507b5f7a5aab03a16

Fix mkdoc & not rebuilding upon src update

common.mk +1 -1
mkdoc +2 -2

diff --git a/common.mk b/common.mk
index 14f85f5..581a0e3 100644
--- a/common.mk
+++ b/common.mk
@@ -42,7 +42,7 @@ CLEAN = $(BLD_STATIC_LIBS) $(BLD_SHARED_LIBS) $(BLD_BINS)
 build: comain
 	$(_DIR) comain/mkbuild
 
-build/doc/%.md: | build
+build/doc/%.md: src/doc/%.md | build
 	$(_DOC) comain/mkdoc $< $@
 
 build/%.o: src/%.c Makefile common.mk config.mk project.mk | build
diff --git a/mkdoc b/mkdoc
index ecfe89c..60b0a22 100755
--- a/mkdoc
+++ b/mkdoc
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-dst="$1"
-src="src/$(expr substr "$dst" 7 ${#dst})"
+src="$1"
+dst="$2"
 
 if test -L "$src"; then
     exec cp -a "$src" "$dst"