2 coqfiles := $(shell find src -name \*.v | grep -v \\\#)
3 allfiles := $(coqfiles) $(shell find src -name \*.hs | grep -v \\\#)
5 default: build/CoqPass.hs
7 build/CoqPass.hs: $(allfiles)
8 make build/Makefile.coq
9 cd build; make -f Makefile.coq OPT=-dont-load-proofs ExtractionMain.vo
10 cd build; make -f Makefile.coq Extraction.vo
11 cat src/Extraction-prefix.hs > build/CoqPass.hs
12 cat build/Extraction.hs | grep -v '^module' | grep -v '^import' >> build/CoqPass.hs
14 build/Makefile.coq: $(coqfiles) src/categories/src
18 cd build; ln -fs `find ../src -name \*.v` .
19 cd build; coq_makefile *.v > Makefile.coq
22 git submodule update --init src/categories
23 cd compiler/categories; git checkout master
30 cd src; for A in *.v; do cat $$A | grep -v '^Require Import' > ../.temp/`echo $$A | sed s_\\\\.v_._`; done
31 cd src/categories/src; for A in *.v; do cat $$A | grep -v '^Require Import' > ../../../.temp/`echo $$A | sed s_\\\\.v_._`; done
32 cp src/Banner.v .temp/GArrows.v
33 cd .temp; grep '^Require Import ' ../src/All.v | sed 's_Require Import _echo;echo;echo;echo;echo;cat _' | bash >> GArrows.v
34 cd .temp; time $(coqc) -dont-load-proofs -verbose GArrows.v
40 # this is for Adam's use only!
41 push: build/CoqPass.hs
42 git push http://git.megacz.com/coq-hetmet.git master
43 git add -f build/CoqPass.hs; \
44 git commit -m 'update baked-in CoqPass.hs' && \
45 (git push -f http://git.megacz.com/coq-hetmet.git master:coq-extraction-baked-in; \
49 cd .temp; ln -s ../src/*.v .
50 cd .temp; for A in *.v; do \
51 echo Latexing $$A ... ;\
52 echo '\\documentclass[9pt,landscape]{article}' > $$A.tex; \
53 echo '\\usepackage[landscape]{geometry}' >> $$A.tex; \
54 echo '\\usepackage[cm]{fullpage}' >> $$A.tex; \
55 echo '\\usepackage{amsmath}' >> $$A.tex; \
56 echo '\\usepackage{amssymb}' >> $$A.tex; \
57 echo '\\usepackage{stmaryrd}' >> $$A.tex; \
58 echo '\\usepackage{upgreek}' >> $$A.tex; \
59 echo '\\usepackage{parskip}' >> $$A.tex; \
60 echo '\\begin{document}' >> $$A.tex; \
61 echo '{{\\tt{' >> $$A.tex; \
63 java -jar ~/bin/unicode2tex.jar < ../src/$$A >> $$A.tex;\
64 echo '}}}' >> $$A.tex; \
65 echo '\\end{document}' >> $$A.tex; \
66 pdflatex $$A.tex < /dev/null; done
67 ssh login.eecs.berkeley.edu -- 'rm public_html/coq-in-ghc/pdfs/*.pdf' ; true
68 scp .temp/*.pdf login.eecs.berkeley.edu:public_html/coq-in-ghc/pdfs/