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 := $(shell coqc -v | head -n1 | sed 's_.*version __' | sed 's_ .*__')
5 coq_version_wanted := 8.3pl2-tracer
10 $(MAKE) build/Makefile.coq
11 cd build; $(MAKE) -f Makefile.coq OPT="-opt -dont-load-proofs" All.vo
13 build/CoqPass.hs: $(allfiles)
14 ifeq ($(coq_version),$(coq_version_wanted))
15 make build/Makefile.coq
16 cd build; $(MAKE) -f Makefile.coq OPT="-opt -dont-load-proofs" ExtractionMain.vo
17 cd build; $(MAKE) -f Makefile.coq Extraction.vo
18 cat src/Extraction-prefix.hs > build/CoqPass.hs
19 cat build/Extraction.hs | grep -v '^module' | grep -v '^import' >> build/CoqPass.hs
22 @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 @echo ++ YOU DO NOT HAVE COQ VERSION $(coq_version_wanted) INSTALLED ++
24 @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26 @echo Therefore, I am going to "git pull -f" from the coq-extraction-baked-in
27 @echo branch of the repository.
29 git pull -f http://git.megacz.com/coq-hetmet.git coq-extraction-baked-in:master
33 build/Makefile.coq: $(coqfiles) src/categories/src
37 cd build; ln -fs `find ../src -name \*.v` .
38 cd build; coq_makefile *.v > Makefile.coq
41 git submodule update --init src/categories
42 cd src/categories; git checkout master
48 ../../../inplace/bin/ghc-stage2 GArrowTikZ.hs
49 ./GArrowTikZ > test.tex
53 examples/doc/index.html:
55 haddock --html Unify.hs
61 cd src; for A in *.v; do cat $$A | grep -v '^Require Import' > ../.temp/`echo $$A | sed s_\\\\.v_._`; done
62 cd src/categories/src; for A in *.v; do cat $$A | \
63 grep -v '^Require Import' > ../../../.temp/`echo $$A | sed s_\\\\.v_._`; done
64 cp src/Banner.v .temp/GArrows.v
65 cd .temp; grep '^Require Import ' ../src/All.v | sed 's_Require Import _echo;echo;echo;echo;echo;cat _' | bash >> GArrows.v
66 cd .temp; time $(coqc) -dont-load-proofs -verbose GArrows.v
72 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'
73 rsync -are ssh --progress --verbose --exclude .git --exclude src/categories/build/ --exclude build/ ./ megacz.com:/tmp/pushcheck/ghc-hetmet/compiler/hetmet/
74 ssh megacz.com -- '/vol/megacz/pushcheck2.sh'
77 # this is for Adam's use only!
78 push: build/CoqPass.hs
79 git push http://git.megacz.com/coq-hetmet.git master
80 git add -f build/CoqPass.hs; \
81 git commit -m 'update baked-in CoqPass.hs' && \
82 (git push -f http://git.megacz.com/coq-hetmet.git master:coq-extraction-baked-in; \
86 cd .temp; ln -s ../src/*.v .
87 cd .temp; for A in *.v; do \
88 echo Latexing $$A ... ;\
89 echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \
90 echo '\\usepackage[landscape]{geometry}' >> $$A.tex; \
91 echo '\\usepackage[cm]{fullpage}' >> $$A.tex; \
92 echo '\\usepackage{amsmath}' >> $$A.tex; \
93 echo '\\usepackage{amssymb}' >> $$A.tex; \
94 echo '\\usepackage{stmaryrd}' >> $$A.tex; \
95 echo '\\usepackage{upgreek}' >> $$A.tex; \
96 echo '\\usepackage{parskip}' >> $$A.tex; \
97 echo '\\begin{document}' >> $$A.tex; \
98 echo '{{\\tt{' >> $$A.tex; \
100 java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\
101 echo '}}}' >> $$A.tex; \
102 echo '\\end{document}' >> $$A.tex; \
103 pdflatex $$A.tex < /dev/null; done
104 ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true
105 scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/