COQC=coqc MC= WEB=/media/sophia/www-sop/teams/marelle/coq-18/ VS=$(filter-out %tmp.v,$(filter-out %-todo.v,$(wildcard *.v))) EX=$(filter-out %tmp.v,$(filter-out %-todo.v,$(wildcard exercise*.v))) FILES=$(VS:%.v=%.html) $(VS) $(EX:%.v=%-todo.v) $(EX:%.v=%-solution.html) all: jscoq udoc/udoc.byte cheat-sheet/cheatsheet.pdf $(FILES) jscoq: jscoq.tgz tar -xzf jscoq.tgz touch jscoq cd jscoq/coq-js; ln -sf ../coq-pkgs . echo '#document { max-width: 50em; width: 100% }' >> jscoq/ui-css/jscoq.css sed -i 's/width: 51em;/max-width: 51em;/' jscoq/ui-css/coq-base.css udoc/udoc.byte: udoc.patch $(MAKE) check-ocaml-ver-4.02.0 rm -rf udoc git clone https://github.com/ejgallego/udoc.git cd udoc && git checkout ff209e2ba83e7472cd4da8f2adf5f9a09a55de2f cd udoc && patch -p1 < ../udoc.patch cd udoc && make cheat-sheet/cheatsheet.pdf: cheat-sheet/cheatsheet.tex make -C cheat-sheet check-ocaml-ver-%: @ V=`(echo -n '2 '; ocamlc -version; echo -n '1 '; echo $*) \ | sed 's/\./ /g' \ | sort -n -k 4 -k 3 -k 2 -k 1 | head -n 1 | cut -d ' ' -f 1)`; \ if `test $$V = 2`; then echo "OCaml must be >= $*"; false; fi upload: $(FILES) cheat-sheet/cheatsheet.pdf jscoq.tgz mkdir -p $(WEB) [ -d $(WEB)/jscoq ] || cp -ra jscoq $(WEB) cp $(FILES) FileSaver.js Blob.js local.css cheat-sheet/cheatsheet.pdf \ $(WEB) %.html.tmp: %.v header footer Makefile udoc/udoc.byte @cat header $< footer > $*tmp.v @# if does not work, then html ok but no links -$(COQC) $*tmp.v > /dev/null @# -$(COQC) -R $(MC) mathcomp -I $(MC) $< @./udoc/udoc.byte -t $* $*tmp.v -o $@ @sed -i -e 's?^ *