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