1 coqc := coqc -noglob -opt
2 coqfiles := $(shell find src -name \*.v | grep -v \\\#)
3 allfiles := $(coqfiles) $(shell find src -name \*.hs | grep -v \\\#)
4 coq_version := 8.3pl2-tracer
9 $(MAKE) build/Makefile.coq
10 cd build; $(MAKE) -f Makefile.coq OPT="-opt -dont-load-proofs" All.vo
12 build/CoqPass.hs: $(allfiles)
13 $(coqc) -v | grep 'version $(coq_version)' || (echo;echo "You need Coq version $(coq_version) to proceed";echo; false)
14 make build/Makefile.coq
15 cd build; $(MAKE) -f Makefile.coq OPT="-opt -dont-load-proofs" ExtractionMain.vo
16 cd build; $(MAKE) -f Makefile.coq Extraction.vo
17 cat src/Extraction-prefix.hs > build/CoqPass.hs
18 cat build/Extraction.hs | grep -v '^module' | grep -v '^import' >> build/CoqPass.hs
20 build/Makefile.coq: $(coqfiles) src/categories/src
24 cd build; ln -fs `find ../src -name \*.v` .
25 cd build; coq_makefile *.v > Makefile.coq
28 git submodule update --init src/categories
29 cd src/categories; git checkout master
35 ../../../inplace/bin/ghc-stage2 GArrowTikZ.hs
36 ./GArrowTikZ > test.tex
40 examples/doc/index.html:
42 haddock --html Unify.hs
48 cd src; for A in *.v; do cat $$A | grep -v '^Require Import' > ../.temp/`echo $$A | sed s_\\\\.v_._`; done
49 cd src/categories/src; for A in *.v; do cat $$A | \
50 grep -v '^Require Import' > ../../../.temp/`echo $$A | sed s_\\\\.v_._`; done
51 cp src/Banner.v .temp/GArrows.v
52 cd .temp; grep '^Require Import ' ../src/All.v | sed 's_Require Import _echo;echo;echo;echo;echo;cat _' | bash >> GArrows.v
53 cd .temp; time $(coqc) -dont-load-proofs -verbose GArrows.v
59 ssh megacz.com -- 'rm -rf /tmp/pushcheck; mkdir /tmp/pushcheck; cd /tmp/pushcheck; git clone http://git.megacz.com/ghc-hetmet.git && git clone http://git.megacz.com/coq-hetmet.git ghc-hetmet/compiler/hetmet'
60 rsync -are ssh --progress --verbose --exclude .git --exclude src/categories/build/ --exclude build/ ./ megacz.com:/tmp/pushcheck/ghc-hetmet/compiler/hetmet/
61 ssh megacz.com -- '/vol/megacz/pushcheck2.sh'
64 # this is for Adam's use only!
65 push: build/CoqPass.hs
66 git push http://git.megacz.com/coq-hetmet.git master
67 git add -f build/CoqPass.hs; \
68 git commit -m 'update baked-in CoqPass.hs' && \
69 (git push -f http://git.megacz.com/coq-hetmet.git master:coq-extraction-baked-in; \
73 cd .temp; ln -s ../src/*.v .
74 cd .temp; for A in *.v; do \
75 echo Latexing $$A ... ;\
76 echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \
77 echo '\\usepackage[landscape]{geometry}' >> $$A.tex; \
78 echo '\\usepackage[cm]{fullpage}' >> $$A.tex; \
79 echo '\\usepackage{amsmath}' >> $$A.tex; \
80 echo '\\usepackage{amssymb}' >> $$A.tex; \
81 echo '\\usepackage{stmaryrd}' >> $$A.tex; \
82 echo '\\usepackage{upgreek}' >> $$A.tex; \
83 echo '\\usepackage{parskip}' >> $$A.tex; \
84 echo '\\begin{document}' >> $$A.tex; \
85 echo '{{\\tt{' >> $$A.tex; \
87 java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\
88 echo '}}}' >> $$A.tex; \
89 echo '\\end{document}' >> $$A.tex; \
90 pdflatex $$A.tex < /dev/null; done
91 ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true
92 scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/