annotate Makefile @ 311:4cb3ba8604bc

Pass through first half of StackMachine, along with some reorganization of the build process
author Adam Chlipala <adam@chlipala.net>
date Mon, 29 Aug 2011 15:31:06 -0400
parents d2cb78f54454
children d5787b70cf48
rev   line source
adam@297 1 MODULES_NODOC := Tactics MoreSpecif DepList
adamc@24 2 MODULES_PROSE := Intro
adamc@105 3 MODULES_CODE := StackMachine InductiveTypes Predicates Coinductive Subset \
adamc@227 4 MoreDep DataStruct Equality Generic Universes Match Reflection \
adamc@265 5 Large Firstorder DeBruijn Hoas Interps Extensional Intensional OpSem
adamc@22 6 MODULES_DOC := $(MODULES_PROSE) $(MODULES_CODE)
adamc@3 7 MODULES := $(MODULES_NODOC) $(MODULES_DOC)
adamc@3 8 VS := $(MODULES:%=src/%.v)
adam@311 9 TEX := $(MODULES:%=latex/%.v.tex)
adamc@3 10 VS_DOC := $(MODULES_DOC:%=%.v)
adamc@22 11 TEMPLATES := $(MODULES_CODE:%=templates/%.v)
adamc@2 12
adam@307 13 .PHONY: coq clean doc html templates install cpdt.tgz pdf
adamc@2 14
adamc@2 15 coq: Makefile.coq
adam@305 16 $(MAKE) -f Makefile.coq
adamc@2 17
adamc@2 18 Makefile.coq: Makefile $(VS)
adamc@2 19 coq_makefile $(VS) \
adamc@215 20 COQC = "coqc -I src" \
adamc@89 21 COQDEP = "coqdep -I src" \
adamc@2 22 -o Makefile.coq
adamc@2 23
adamc@2 24 clean:: Makefile.coq
adam@305 25 $(MAKE) -f Makefile.coq clean
adam@311 26 rm -f Makefile.coq .depend cpdt.tgz templates/*.v
adam@311 27 cd latex; rm -f *.sty *.log *.aux *.dvi *.tex *.toc *.bbl *.blg *.idx *.ilg *.pdf *.ind *.out
adamc@3 28
adam@306 29 doc: latex/cpdt.pdf html
adamc@3 30
adam@311 31 latex/%.v.tex: Makefile src/%.v src/%.glob
adam@311 32 cd src ; coqdoc --interpolate --latex --body-only -s \
adam@311 33 $*.v -o ../latex/$*.v.tex
adamc@3 34
adam@311 35 latex/cpdt.pdf: latex/cpdt.tex $(TEX) latex/cpdt.bib
adam@311 36 cd latex ; pdflatex cpdt ; pdflatex cpdt ; bibtex cpdt ; makeindex cpdt ; pdflatex cpdt ; pdflatex cpdt
adamc@4 37
adam@306 38 latex/%.pdf: latex/%.tex latex/cpdt.bib
adam@306 39 cd latex ; pdflatex $* ; pdflatex $* ; bibtex $* ; makeindex $* ; pdflatex $* ; pdflatex $*
adamc@8 40
adamc@39 41 html: Makefile $(VS) src/toc.html
adamc@205 42 mkdir -p html
adamc@206 43 cd src ; coqdoc --interpolate $(VS_DOC) \
adamc@4 44 -d ../html
adamc@39 45 cp src/toc.html html/
adamc@4 46
adamc@22 47 templates: $(TEMPLATES)
adamc@22 48
adamc@41 49 templates/%.v: src/%.v tools/make_template.ml
adamc@22 50 ocaml tools/make_template.ml <$< >$@
adamc@39 51
adamc@39 52 cpdt.tgz:
adamc@39 53 hg archive -t tgz $@
adamc@39 54
adamc@39 55 install: cpdt.tgz latex/cpdt.pdf html
adamc@39 56 cp cpdt.tgz staging/
adamc@39 57 cp latex/cpdt.pdf staging/
adamc@39 58 cp -R html staging/
adam@307 59 rsync -az --exclude '*~' staging/* chlipala.net:sites/chlipala/adam/cpdt/
adam@307 60
adam@307 61 pdf:
adam@307 62 evince latex/cpdt.pdf&