summaryrefslogtreecommitdiffstats
path: root/docs/proto/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'docs/proto/Makefile')
-rw-r--r--docs/proto/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/proto/Makefile b/docs/proto/Makefile
new file mode 100644
index 00000000..63086b38
--- /dev/null
+++ b/docs/proto/Makefile
@@ -0,0 +1,18 @@
+
+#.SUFFIXES: .c .txt
+
+# XXX 這有沒有比較好的作法?
+# 直接用 .c.txt 好像會先去看目前目錄有沒有 xxx.c @_@
+
+NAME!= cd ../../mbbsd/ && ls *.c | sed -e "s/\.c//"
+SRC!= cd ../../mbbsd/ && ls *.c | sed -e "s/\.c/.txt/"
+
+all: $(SRC)
+
+.for fn in $(NAME)
+$(fn).txt: ../../mbbsd/$(fn).c
+ ./cdoc ../../mbbsd/$(fn).c > $(fn).txt
+.endfor
+
+clean:
+ rm -f *.txt