From 882dbccb43a4546b894ccf5f91436b74c268980f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 23 Jun 2015 18:00:43 +0200 Subject: [PATCH] Makefile Magic --- Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bb5826c..eb1851e 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,18 @@ FILES=$(wildcard src/*.rs) +DOCFILES=$(addsuffix .html,$(addprefix docs/,$(notdir $(basename $(FILES))))) -all: docs rawsrc -.PHONY: docs rawsrc +all: docs crates +.PHONY: docs rawsrc crates -docs: - @./pycco-rs $(FILES) +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 -- 2.30.2