X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fdidactic%2FMakefile;h=d31ab55257eeff69475c0558621a2faa2c7c9e10;hb=625846fd7d1b0063b3b3a81ff9bbf36ddccf84f1;hp=a904aaef4cba17ca0cc9a232dc0c12f8e8650355;hpb=c775f53f9aae44897fb13342cd9f2e7ec5e394f7;p=helm.git diff --git a/helm/software/matita/contribs/didactic/Makefile b/helm/software/matita/contribs/didactic/Makefile index a904aaef4..d31ab5525 100644 --- a/helm/software/matita/contribs/didactic/Makefile +++ b/helm/software/matita/contribs/didactic/Makefile @@ -14,8 +14,9 @@ depend: $(BIN)matitadep -dot && rm depends.dot depend.opt: $(BIN)matitadep.opt -dot && rm depends.dot -exercise: - rm -rf ex/ - mkdir ex/ - cp *.ma root depends ex/ - for X in ex/*.ma; do perl -ne 'undef $$/;s/\(\*BEGIN.*?END\*\)/.../msg;print' -i $$X; done +exercise-%: % + cp $< $@ + perl -ne 'undef $$/;s/\(\*BEGIN.*?END\*\)/…/msg;print' -i $@ + perl -ne 'undef $$/;s/\(\*DOCBEGIN.*?DOCEND\*\)//msg;print' -i $@ + (echo ''; awk 'BEGIN { p = 0; } /DOCEND/ { p = 0; } { if (p == 1) print $$0; } /DOCBEGIN/ { p = 1;}' < $< | markdown; echo '') > $@.html +