]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/library/didactic/exercises/Makefile
make all/clean implemented
[helm.git] / helm / software / matita / library / didactic / exercises / Makefile
index d31ab55257eeff69475c0558621a2faa2c7c9e10..4fbbbaad8721e9331673acd73c125b69e6fe686d 100644 (file)
@@ -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 '<?xml version="1.0" encoding="UTF-8"?><html><head></meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">pre, code { font-family: Sans; font-size: 1em; background-color:#efee79; } pre { margin-right: 5em;}</style></head><body>'; awk 'BEGIN { p = 0; } /DOCEND/ { p = 0; } { if (p == 1) print $$0; } /DOCBEGIN/ { p = 1;}' < $< | markdown; echo '</body></html>') > $@.html
+       (echo '<?xml version="1.0" encoding="UTF-8"?><html><head></meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">pre, code { font-family: Sans; font-size: 1em; background-color:#efee79; } pre { margin-right: 5em;}</style></head><body>'; awk 'BEGIN { p = 0; } /DOCEND/ { p = 0; } { if (p == 1) print $$0; } /DOCBEGIN/ { p = 1;}' < $< | markdown; echo '</body></html>') > exercise-$*.html