fix the main file(s)
[rust-101.git] / Makefile
index cb4172e8da0857e2c49d44fbcca3b2350fa2d9f1..eb1851e73d17898b1c95503cde6d469e6dbb468e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,18 @@
-all: docs
-.PHONY: docs
+FILES=$(wildcard src/*.rs)
+DOCFILES=$(addsuffix .html,$(addprefix docs/,$(notdir $(basename $(FILES)))))
 
-docs:
-       docco src/*.rs -l linear
+all: docs crates
+.PHONY: docs rawsrc crates
+
+docs: $(DOCFILES)
+
+docs/%.html: src/%.rs
+       @./pycco-rs $^
+
+rawsrc:
+       @mkdir -p rawsrc
+       @for file in $(FILES); do echo "$$file -> rawsrc/$$file"; egrep -v "^[[:space:]]*// " "$$file" > "rawsrc/""$$file"; done
+
+crates:
+       @cargo build
+       @cd solutions && cargo build