X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=blobdiff_plain;f=Makefile;h=06d038247acaf863a0c3d01853ccdfa4de934ef1;hp=826866b4132b3789aa00e353241c5233ec4564c9;hb=b3214686b18b2d6f6905394494da8d1c17587bdb;hpb=112daf37524662d6d2267d3f7e50ff3522683b8f diff --git a/Makefile b/Makefile index 826866b..06d0382 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,14 @@ coqc := coqc -noglob -coqfiles := $(shell find src -name \*.v) -allfiles := $(coqfiles) $(shell find src -name \*.hs) +coqfiles := $(shell find src -name \*.v | grep -v \\\#) +allfiles := $(coqfiles) $(shell find src -name \*.hs | grep -v \\\#) default: build/CoqPass.hs -build/CoqPass.hs: build/Makefile.coq $(allfiles) - - # first we build with -dont-load-proofs, since that runs very quickly - cd build; make -f Makefile.coq OPT="-dont-load-proofs" Main.vo - - # however the final extraction must be done without -dont-load-proofs +build/CoqPass.hs: $(allfiles) + make build/Makefile.coq cd build; make -f Makefile.coq Extraction.vo - cat src/Extraction-prefix.hs build/Extraction.hs > build/CoqPass.hs + cat src/Extraction-prefix.hs > build/CoqPass.hs + cat build/Extraction.hs | grep -v '^module' | grep -v '^import' >> build/CoqPass.hs build/Makefile.coq: $(coqfiles) mkdir -p build @@ -21,4 +18,40 @@ build/Makefile.coq: $(coqfiles) cd build; coq_makefile *.v > Makefile.coq clean: - rm -rf build \ No newline at end of file + rm -rf build + + + +# this is for Adam's use only! +push: build/CoqPass.hs + git push http://git.megacz.com/coq-hetmet.git master + git add -f build/CoqPass.hs; \ + git commit -m 'update baked-in CoqPass.hs' && \ + (git push -f http://git.megacz.com/coq-hetmet.git master:coq-extraction-baked-in; \ + git reset HEAD^) + make publish + +publish: + rm -rf .temp + mkdir .temp + cd .temp; ln -s ../src/*.v . + cd .temp; for A in *.v; do \ + echo Latexing $$A ... ;\ + echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \ + echo '\\usepackage[landscape]{geometry}' >> $$A.tex; \ + echo '\\usepackage[cm]{fullpage}' >> $$A.tex; \ + echo '\\usepackage{amsmath}' >> $$A.tex; \ + echo '\\usepackage{amssymb}' >> $$A.tex; \ + echo '\\usepackage{stmaryrd}' >> $$A.tex; \ + echo '\\usepackage{upgreek}' >> $$A.tex; \ + echo '\\usepackage{parskip}' >> $$A.tex; \ + echo '\\begin{document}' >> $$A.tex; \ + echo '{{\\tt{' >> $$A.tex; \ + echo '' >> $$A.tex; \ + java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\ + echo '}}}' >> $$A.tex; \ + echo '\\end{document}' >> $$A.tex; \ + pdflatex $$A.tex < /dev/null; done + ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true + scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/ + rm -rf .temp