Mercurial > hgbook
annotate en/Makefile @ 0:76fba5835a1b
Beginnings of a build process and file layout.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 23 Jun 2006 12:15:22 -0700 |
parents | |
children | 379a802c0210 |
rev | line source |
---|---|
0
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 sources := 00book.tex mq.tex |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 latex-options = \ |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 -interaction batchmode \ |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 -output-directory $(dir $(1)) \ |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 -jobname $(basename $(notdir $(1))) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 all: pdf html |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 pdf: pdf/hgbook.pdf |
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 pdf/hgbook.pdf: $(sources) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 mkdir -p $(dir $@) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 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
|
15 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
|
16 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
|
17 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 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
|
19 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 define htlatex |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 mkdir -p $(dir $(1)) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 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
|
23 chmod 755 $(dir $(1))/htlatex.book |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 $(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
|
25 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
|
26 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
|
27 endef |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
28 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 html/onepage/hgbook.html: $(sources) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
30 $(call htlatex,$@,$<) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
31 |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
32 html/split/hgbook.html: $(sources) |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 $(call htlatex,$@,$<,2) |
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 clean: |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
36 rm -rf html pdf *.aux *.dvi *.log *.out |