comparison Makefile @ 22:91e247c68ee8

Template generation
author Adam Chlipala <adamc@hcoop.net>
date Fri, 05 Sep 2008 16:46:32 -0400
parents 00366a62bd00
children aba1a37394c4
comparison
equal deleted inserted replaced
21:00366a62bd00 22:91e247c68ee8
1 MODULES_NODOC := Tactics 1 MODULES_NODOC := Tactics
2 MODULES_DOC := Intro StackMachine 2 MODULES_PROSE := StackMachine
3 MODULES_CODE := StackMachine
4 MODULES_DOC := $(MODULES_PROSE) $(MODULES_CODE)
3 MODULES := $(MODULES_NODOC) $(MODULES_DOC) 5 MODULES := $(MODULES_NODOC) $(MODULES_DOC)
4 VS := $(MODULES:%=src/%.v) 6 VS := $(MODULES:%=src/%.v)
5 VS_DOC := $(MODULES_DOC:%=%.v) 7 VS_DOC := $(MODULES_DOC:%=%.v)
6 GLOBALS := .coq_globals 8 GLOBALS := .coq_globals
9 TEMPLATES := $(MODULES_CODE:%=templates/%.v)
7 10
8 .PHONY: coq clean doc dvi html 11 .PHONY: coq clean doc dvi html templates
9 12
10 coq: Makefile.coq 13 coq: Makefile.coq
11 make -f Makefile.coq 14 make -f Makefile.coq
12 15
13 Makefile.coq: Makefile $(VS) 16 Makefile.coq: Makefile $(VS)
17 -o Makefile.coq 20 -o Makefile.coq
18 21
19 clean:: Makefile.coq 22 clean:: Makefile.coq
20 make -f Makefile.coq clean 23 make -f Makefile.coq clean
21 rm -f Makefile.coq .depend $(GLOBALS) \ 24 rm -f Makefile.coq .depend $(GLOBALS) \
22 latex/*.sty latex/cpdt.* 25 latex/*.sty latex/cpdt.* templates/*.v
23 26
24 doc: latex/cpdt.dvi latex/cpdt.pdf html 27 doc: latex/cpdt.dvi latex/cpdt.pdf html
25 28
26 latex/cpdt.tex: Makefile $(VS) 29 latex/cpdt.tex: Makefile $(VS)
27 cd src ; coqdoc --latex $(VS_DOC) \ 30 cd src ; coqdoc --latex $(VS_DOC) \
42 --glob-from ../$(GLOBALS) \ 45 --glob-from ../$(GLOBALS) \
43 -d ../html 46 -d ../html
44 47
45 dvi: 48 dvi:
46 xdvi latex/cpdt 49 xdvi latex/cpdt
50
51 templates: $(TEMPLATES)
52
53 templates/%.v: src/%.v
54 ocaml tools/make_template.ml <$< >$@