]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/didactic/Makefile
...
[helm.git] / helm / software / matita / contribs / didactic / Makefile
1 include ../Makefile.defs
2
3 DIR=$(shell basename $$PWD)
4
5 $(DIR) all:
6         $(BIN)matitac
7 $(DIR).opt opt all.opt:
8         $(BIN)matitac.opt
9 clean:
10         $(BIN)matitaclean
11 clean.opt:
12         $(BIN)matitaclean.opt
13 depend:
14         $(BIN)matitadep -dot && rm depends.dot
15 depend.opt:
16         $(BIN)matitadep.opt -dot && rm depends.dot
17 exercise-%: %
18         cp $< $@
19         perl -ne 'undef $$/;s/\(\*BEGIN.*?END\*\)/…/msg;print' -i $@
20         perl -ne 'undef $$/;s/\(\*DOCBEGIN.*?DOCEND\*\)//msg;print' -i $@
21         (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
22