1 FILES=$(wildcard src/*.rs)
2 DOCFILES=$(addsuffix .html,$(addprefix docs/,$(notdir $(basename $(FILES)))))
3 WORKSPACEFILES=$(addprefix workspace/,$(FILES))
5 all: docs workspace crates
6 .PHONY: docs workspace crates
11 .tmp/docs/%.rs: src/%.rs Makefile
14 @sed 's|^\(\s*//\)@|\1|;s|\s*/\*@\*/||' $< > $@
16 docs/%.html: .tmp/docs/%.rs
20 workspace: $(WORKSPACEFILES)
22 workspace/src/%.rs: src/%.rs Makefile dup-unimpl.sed
25 @echo "// ***Remember to enable/add this part in \`main.rs\`!***" > $@
27 @sed '/^\s*\/\/@/d;s|\(\s*\)\S.*/\*@\*/|\1unimplemented!()|' $< | sed -f dup-unimpl.sed >> $@
29 workspace/src/main.rs:
30 # Don't touch this file
35 @cd solutions && cargo build