hgbook

view en/Makefile @ 2:379a802c0210

Add bibliography.
author Bryan O'Sullivan <bos@serpentine.com>
date Sat Jun 24 16:14:02 2006 -0700 (2006-06-24)
parents 76fba5835a1b
children 33a2e7b9978d
line source
1 sources := \
2 00book.tex \
3 99book.bib \
4 99defs.tex \
5 mq.tex
7 latex-options = \
8 -interaction batchmode \
9 -output-directory $(dir $(1)) \
10 -jobname $(basename $(notdir $(1)))
12 all: pdf html
14 pdf: pdf/hgbook.pdf
16 pdf/hgbook.pdf: $(sources)
17 mkdir -p $(dir $@)
18 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
19 cp 99book.bib $(dir $@)
20 cd $(dir $@) && bibtex $(basename $(notdir $@))
21 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
22 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
24 html: html/onepage/hgbook.html html/split/hgbook.html
26 define htlatex
27 mkdir -p $(dir $(1))
28 head -4 $(shell which htlatex) > $(dir $(1))/htlatex.book
29 chmod 755 $(dir $(1))/htlatex.book
30 $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
31 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
32 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
33 endef
35 html/onepage/hgbook.html: $(sources)
36 $(call htlatex,$@,$<)
38 html/split/hgbook.html: $(sources)
39 $(call htlatex,$@,$<,2)
41 clean:
42 rm -rf html pdf *.aux *.dvi *.log *.out