X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/7858ea50a3c07211952b5d26c855d59a00d6dd92..d9fc9a4d89d8e4950f43308318962d9179bd1177:/Makefile diff --git a/Makefile b/Makefile index cb4172e..eb1851e 100644 --- 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