separate type/coer/expr variables in HaskWeak case branches
[coq-hetmet.git] / Makefile
1 coqc     := coqc -noglob
2 coqfiles := $(shell find src -name \*.v)
3 allfiles := $(coqfiles) $(shell find src -name \*.hs)
4
5 default: build/CoqPass.hs
6
7 build/CoqPass.hs: build/Makefile.coq $(allfiles)
8
9         # first we build with -dont-load-proofs, since that runs very quickly
10         cd build; make -f Makefile.coq OPT="-dont-load-proofs" Main.vo
11
12         # however the final extraction must be done without -dont-load-proofs
13         cd build; make -f Makefile.coq Extraction.vo
14         cat src/Extraction-prefix.hs build/Extraction.hs > build/CoqPass.hs
15
16 build/Makefile.coq: $(coqfiles)
17         mkdir -p build
18         rm -f build/*.v
19         rm -f build/*.d
20         cd build; ln -s ../src/*.v .
21         cd build; coq_makefile *.v > Makefile.coq
22
23 clean:
24         rm -rf build
25
26
27
28 # this is for Adam's use only!
29 publish:
30         rm -rf .temp
31         mkdir .temp
32         cd .temp; ln -s ../src/*.v .
33         cd .temp; for A in *.v; do \
34           echo Latexing $$A ... ;\
35           echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \
36           echo '\\usepackage[landscape]{geometry}'       >> $$A.tex; \
37           echo '\\usepackage[cm]{fullpage}'       >> $$A.tex; \
38           echo '\\usepackage{amsmath}'        >> $$A.tex; \
39           echo '\\usepackage{amssymb}'        >> $$A.tex; \
40           echo '\\usepackage{stmaryrd}'       >> $$A.tex; \
41           echo '\\usepackage{upgreek}'        >> $$A.tex; \
42           echo '\\usepackage{parskip}'        >> $$A.tex; \
43           echo '\\begin{document}'            >> $$A.tex; \
44           echo '{{\\tt{'           >> $$A.tex; \
45           echo ''           >> $$A.tex; \
46           java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\
47           echo '}}}'                           >> $$A.tex; \
48           echo '\\end{document}'              >> $$A.tex; \
49           pdflatex $$A.tex < /dev/null; done
50         ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true
51         scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/
52         rm -rf .temp