comparison Makefile @ 306:a419a60e5ff6

Started revising Intro
author Adam Chlipala <adam@chlipala.net>
date Thu, 25 Aug 2011 11:46:56 -0400
parents 690796f4690d
children d2cb78f54454
comparison
equal deleted inserted replaced
305:690796f4690d 306:a419a60e5ff6
7 MODULES := $(MODULES_NODOC) $(MODULES_DOC) 7 MODULES := $(MODULES_NODOC) $(MODULES_DOC)
8 VS := $(MODULES:%=src/%.v) 8 VS := $(MODULES:%=src/%.v)
9 VS_DOC := $(MODULES_DOC:%=%.v) 9 VS_DOC := $(MODULES_DOC:%=%.v)
10 TEMPLATES := $(MODULES_CODE:%=templates/%.v) 10 TEMPLATES := $(MODULES_CODE:%=templates/%.v)
11 11
12 .PHONY: coq clean doc dvi html templates install cpdt.tgz 12 .PHONY: coq clean doc html templates install cpdt.tgz
13 13
14 coq: Makefile.coq 14 coq: Makefile.coq
15 $(MAKE) -f Makefile.coq 15 $(MAKE) -f Makefile.coq
16 16
17 Makefile.coq: Makefile $(VS) 17 Makefile.coq: Makefile $(VS)
22 22
23 clean:: Makefile.coq 23 clean:: Makefile.coq
24 $(MAKE) -f Makefile.coq clean 24 $(MAKE) -f Makefile.coq clean
25 rm -f Makefile.coq .depend cpdt.tgz \ 25 rm -f Makefile.coq .depend cpdt.tgz \
26 latex/*.sty latex/cpdt.* templates/*.v 26 latex/*.sty latex/cpdt.* templates/*.v
27 rm -f *.aux *.dvi *.log 27 rm -f *.aux *.log
28 28
29 doc: latex/cpdt.dvi latex/cpdt.pdf html 29 doc: latex/cpdt.pdf html
30 30
31 latex/cpdt.tex: Makefile $(VS) 31 latex/cpdt.tex: Makefile $(VS) src/BackMatter.v latex/cpdt.bib
32 cd src ; coqdoc --interpolate --latex -s $(VS_DOC) \ 32 cd src ; coqdoc --interpolate --latex -s $(VS_DOC) BackMatter.v \
33 -p "\usepackage{url,amsmath,amssymb}" \ 33 -p "\usepackage{url}" \
34 -p "\title{Certified Programming with Dependent Types}" \
35 -p "\author{Adam Chlipala}" \
36 -p "\iffalse" \ 34 -p "\iffalse" \
37 -o ../latex/cpdt.tex 35 -o ../latex/cpdt.tex
38 36
39 latex/%.tex: src/%.v src/%.glob 37 latex/%.tex: src/%.v src/%.glob
40 cd src ; coqdoc --interpolate --latex \ 38 cd src ; coqdoc --interpolate --latex \
41 -p "\usepackage{url,amsmath,amssymb}" \ 39 -p "\usepackage{url}" \
42 $*.v -o ../latex/$*.tex 40 $*.v -o ../latex/$*.tex
43 41
44 latex/%.dvi: latex/%.tex 42 latex/%.pdf: latex/%.tex latex/cpdt.bib
45 cd latex ; latex $* ; latex $* 43 cd latex ; pdflatex $* ; pdflatex $* ; bibtex $* ; makeindex $* ; pdflatex $* ; pdflatex $*
46
47 latex/%.pdf: latex/%.dvi
48 cd latex ; pdflatex $* ; pdflatex $*
49 44
50 html: Makefile $(VS) src/toc.html 45 html: Makefile $(VS) src/toc.html
51 mkdir -p html 46 mkdir -p html
52 cd src ; coqdoc --interpolate $(VS_DOC) \ 47 cd src ; coqdoc --interpolate $(VS_DOC) \
53 -d ../html 48 -d ../html
54 cp src/toc.html html/ 49 cp src/toc.html html/
55
56 dvi:
57 xdvi latex/cpdt
58 50
59 templates: $(TEMPLATES) 51 templates: $(TEMPLATES)
60 52
61 templates/%.v: src/%.v tools/make_template.ml 53 templates/%.v: src/%.v tools/make_template.ml
62 ocaml tools/make_template.ml <$< >$@ 54 ocaml tools/make_template.ml <$< >$@