give HaskWeak its own type representation, fix numerous bugs
[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         cd build; make -f Makefile.coq Extraction.vo
9         cat src/Extraction-prefix.hs                                     > build/CoqPass.hs
10         cat build/Extraction.hs | grep -v '^module' | grep -v '^import' >> build/CoqPass.hs
11
12 build/Makefile.coq: $(coqfiles)
13         mkdir -p build
14         rm -f build/*.v
15         rm -f build/*.d
16         cd build; ln -s ../src/*.v .
17         cd build; coq_makefile *.v > Makefile.coq
18
19 clean:
20         rm -rf build
21
22
23
24 # this is for Adam's use only!
25 publish:
26         rm -rf .temp
27         mkdir .temp
28         cd .temp; ln -s ../src/*.v .
29         cd .temp; for A in *.v; do \
30           echo Latexing $$A ... ;\
31           echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \
32           echo '\\usepackage[landscape]{geometry}'       >> $$A.tex; \
33           echo '\\usepackage[cm]{fullpage}'       >> $$A.tex; \
34           echo '\\usepackage{amsmath}'        >> $$A.tex; \
35           echo '\\usepackage{amssymb}'        >> $$A.tex; \
36           echo '\\usepackage{stmaryrd}'       >> $$A.tex; \
37           echo '\\usepackage{upgreek}'        >> $$A.tex; \
38           echo '\\usepackage{parskip}'        >> $$A.tex; \
39           echo '\\begin{document}'            >> $$A.tex; \
40           echo '{{\\tt{'           >> $$A.tex; \
41           echo ''           >> $$A.tex; \
42           java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\
43           echo '}}}'                           >> $$A.tex; \
44           echo '\\end{document}'              >> $$A.tex; \
45           pdflatex $$A.tex < /dev/null; done
46         ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true
47         scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/
48         rm -rf .temp