write code for part 03
[rust-101.git] / Makefile
index cb4172e8da0857e2c49d44fbcca3b2350fa2d9f1..dc3ffb02c3be03f3a44fce6636e037ab20087179 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,11 @@
-all: docs
-.PHONY: docs
+FILES=$(wildcard src/*.rs)
+
+all: docs rawsrc
+.PHONY: docs rawsrc
 
 docs:
 
 docs:
-       docco src/*.rs -l linear
+       @docco $(FILES) # -l linear
+
+rawsrc:
+       @mkdir -p rawsrc
+       @for file in $(FILES); do echo "$$file -> raw$$file"; egrep -v "^[[:space:]]*// " "$$file" > "raw""$$file"; done