X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fdidactic%2Fexercises%2FMakefile;h=4fbbbaad8721e9331673acd73c125b69e6fe686d;hb=e18929311cce5baed9bccd9f1de050180f336ed1;hp=d31ab55257eeff69475c0558621a2faa2c7c9e10;hpb=f1f445457c73202fd696c1b9fe0b24c0bafe2452;p=helm.git diff --git a/helm/software/matita/library/didactic/exercises/Makefile b/helm/software/matita/library/didactic/exercises/Makefile index d31ab5525..4fbbbaad8 100644 --- a/helm/software/matita/library/didactic/exercises/Makefile +++ b/helm/software/matita/library/didactic/exercises/Makefile @@ -1,22 +1,13 @@ -include ../Makefile.defs -DIR=$(shell basename $$PWD) +all: + for X in *.ma; do $(MAKE) exercise-$$X; done -$(DIR) all: - $(BIN)matitac -$(DIR).opt opt all.opt: - $(BIN)matitac.opt clean: - $(BIN)matitaclean -clean.opt: - $(BIN)matitaclean.opt -depend: - $(BIN)matitadep -dot && rm depends.dot -depend.opt: - $(BIN)matitadep.opt -dot && rm depends.dot -exercise-%: % + rm exercise-* + +exercise-%.ma: %.ma 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 + (echo ''; awk 'BEGIN { p = 0; } /DOCEND/ { p = 0; } { if (p == 1) print $$0; } /DOCBEGIN/ { p = 1;}' < $< | markdown; echo '') > exercise-$*.html