comparison en/Makefile @ 16:81454425eee9

Progress on a few fronts, mainly indexing and MQ chapter content
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 03 Jul 2006 22:43:52 -0700
parents e9d5b4c3d16b
children e6f4088ebe52
comparison
equal deleted inserted replaced
15:b8ac9f312a47 16:81454425eee9
1 sources := \ 1 sources := \
2 00book.tex \ 2 00book.tex \
3 99book.bib \ 3 99book.bib \
4 99defs.tex \ 4 99defs.tex \
5 mq.tex 5 intro.tex \
6 mq.tex \
7 build_id.tex
6 8
7 image-sources := \ 9 image-sources := \
8 mq-stack.svg 10 mq-stack.svg
9 11
10 example-sources := \ 12 example-sources := \
24 pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%_pdf.png) examples 26 pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%_pdf.png) examples
25 mkdir -p $(dir $@) 27 mkdir -p $(dir $@)
26 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 28 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
27 cp 99book.bib $(dir $@) 29 cp 99book.bib $(dir $@)
28 cd $(dir $@) && bibtex $(basename $(notdir $@)) 30 cd $(dir $@) && bibtex $(basename $(notdir $@))
31 cd $(dir $@) && makeindex $(basename $(notdir $@))
29 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 32 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
30 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 33 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
31 34
32 html: html/onepage/hgbook.html html/split/hgbook.html 35 html: html/onepage/hgbook.html html/split/hgbook.html
33 36
34 define htlatex 37 define htlatex
35 mkdir -p $(dir $(1)) 38 mkdir -p $(dir $(1))
36 head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book 39 head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book
37 cp 99book.bib $(dir $@) 40 cp 99book.bib $(dir $@)
38 echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book 41 echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
42 echo '(cd $(dir $@) && makeindex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
39 head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book 43 head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book
40 echo 'echo status $$$$' >> $(dir $(1))/htlatex.book 44 echo 'echo status $$$$' >> $(dir $(1))/htlatex.book
41 chmod 755 $(dir $(1))/htlatex.book 45 chmod 755 $(dir $(1))/htlatex.book
42 $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) 46 $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
43 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf 47 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
65 examples: examples/.run 69 examples: examples/.run
66 70
67 examples/.run: $(example-sources) 71 examples/.run: $(example-sources)
68 cd examples && ./run-example 72 cd examples && ./run-example
69 73
74 build_id.tex:
75 echo 'in-place build' > $@
76
77 build_id:
78 hg id | sed -e 's/ tip\>//' > build_id.tex
79
70 clean: 80 clean:
71 rm -rf html pdf *.eps *.png *.aux *.dvi *.log *.out examples/*.out examples/.run 81 rm -rf html pdf *.eps *.png *.aux *.dvi *.log *.out examples/*.out examples/.run buildrev.tex