projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add 'rawsrc' target to generate raw sources (without the course comments)
[rust-101.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index cb4172e8da0857e2c49d44fbcca3b2350fa2d9f1..830ba375e150607e20fd9b0e9dcdbf7dffd966de 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