annotate ja/Makefile.tex @ 837:b775f963b18c

Clean up chapter 8, and add content propagate 7226e5e750a6
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 15 Sep 2009 22:32:03 +0900
parents 4cf1bbfe4d2c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
777
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
1 # This makefile requires GNU make.
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
2
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
3 sources := \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
4 00book.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
5 99book.bib \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
6 99defs.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
7 build_id.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
8 branch.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
9 cmdref.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
10 collab.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
11 concepts.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
12 daily.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
13 filenames.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
14 hg_id.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
15 hgext.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
16 hook.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
17 intro.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
18 mq.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
19 mq-collab.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
20 mq-ref.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
21 preface.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
22 srcinstall.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
23 template.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
24 tour-basic.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
25 tour-merge.tex \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
26 undo.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
27
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
28 image-sources := \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
29 feature-branches.dot \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
30 filelog.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
31 kdiff3.png \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
32 metadata.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
33 mq-stack.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
34 note.png \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
35 revlog.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
36 snapshot.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
37 tour-history.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
38 tour-merge-conflict.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
39 tour-merge-merge.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
40 tour-merge-pull.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
41 tour-merge-sep-repos.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
42 undo-manual.dot \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
43 undo-manual-merge.dot \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
44 undo-non-tip.dot \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
45 undo-simple.dot \
837
b775f963b18c Clean up chapter 8, and add content
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 789
diff changeset
46 figs/bad-merge-1.dot \
b775f963b18c Clean up chapter 8, and add content
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 789
diff changeset
47 figs/bad-merge-2.dot \
b775f963b18c Clean up chapter 8, and add content
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 789
diff changeset
48 figs/bad-merge-3.dot \
b775f963b18c Clean up chapter 8, and add content
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 789
diff changeset
49 figs/bad-merge-4.dot \
b775f963b18c Clean up chapter 8, and add content
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 789
diff changeset
50 figs/bad-merge-5.dot \
777
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
51 wdir.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
52 wdir-after-commit.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
53 wdir-branch.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
54 wdir-merge.svg \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
55 wdir-pre-branch.svg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
56
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
57 image-dot := $(filter %.dot,$(image-sources))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
58 image-svg := $(filter %.svg,$(image-sources))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
59 image-png := $(filter %.png,$(image-sources))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
60
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
61 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
62 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
63 #image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
64 image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png:%.png=%.eps)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
65
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
66 example-sources := \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
67 backout \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
68 bisect \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
69 branching \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
70 branch-named \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
71 branch-repo \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
72 cmdref \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
73 daily.copy \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
74 daily.files \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
75 daily.rename \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
76 daily.revert \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
77 extdiff \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
78 filenames \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
79 hook.msglen \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
80 hook.simple \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
81 hook.ws \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
82 issue29 \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
83 mq.guards \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
84 mq.qinit-help \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
85 mq.dodiff \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
86 mq.id \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
87 mq.tarball \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
88 mq.tools \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
89 mq.tutorial \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
90 rename.divergent \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
91 rollback \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
92 tag \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
93 template.simple \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
94 template.svnstyle \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
95 tour \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
96 tour-merge-conflict
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
97
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
98 example-prereqs := \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
99 /usr/bin/merge
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
100
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
101 dist-sources := \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
102 ../html/hgicon.png \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
103 ../html/index.html.var \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
104 ../html/index.en.html
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
105
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
106 latex-options = \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
107 -interaction batchmode \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
108 -output-directory $(dir $(1)) \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
109 -jobname $(basename $(notdir $(1)))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
110
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
111 hg = $(shell which hg)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
112
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
113 hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
114
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
115 hg-version = $(shell hg version -q | \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
116 sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
117
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
118 all: dvi
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
119
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
120 #dvi: $(sources) $(image-eps) examples
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
121 dvi: $(sources) $(image-eps)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
122 platex 00book.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
123
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
124 cp 00book.aux hgbook.aux
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
125 bibtex hgbook
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
126
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
127 platex 00book.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
128 platex 00book.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
129 platex 00book.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
130
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
131
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
132
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
133
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
134
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
135
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
136 pdf: pdf/hgbook.pdf
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
137
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
138 define pdf
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
139 mkdir -p $(dir $@)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
140 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
141
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
142 cp 99book.bib $(dir $@)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
143
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
144 cd $(dir $@) && bibtex $(basename $(notdir $@))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
145 cd $(dir $@) && makeindex $(basename $(notdir $@))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
146
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
147 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
148 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
149 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
150 endef
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
151
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
152 #pdf/hgbook.pdf: $(sources) $(image-pdf) examples
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
153 pdf/hgbook.pdf: $(sources) $(image-pdf)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
154 $(call pdf)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
155
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
156 html: onepage split
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
157
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
158 onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
159
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
160 html/onepage/%: %
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
161 cp $< $@
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
162
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
163 split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
164
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
165 html/split/%: %
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
166 cp $< $@
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
167
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
168 # This is a horrible hack to work around the fact that the htlatex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
169 # command in tex4ht is itself a horrible hack. I really don't want to
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
170 # include verbatim the big wad of TeX that is repeated in that script,
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
171 # but I've given up and run a hacked copy as htlatex.book here.
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
172
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
173 define htlatex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
174 mkdir -p $(dir $(1))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
175 cp 99book.bib $(dir $(1))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
176 TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
177 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
178 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
179 ./fixhtml.py $(dir $(1))/*.html
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
180 rm $(dir $(1))/hgbook.css
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
181 endef
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
182
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
183 #html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
184 html/onepage/hgbook.html: $(sources) $(image-html) bookhtml.cfg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
185 $(call htlatex,$@,$<)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
186
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
187 #html/split/hgbook.html: $(sources) examples bookhtml.cfg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
188 html/split/hgbook.html: $(sources) bookhtml.cfg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
189 $(call htlatex,$@,$<,2)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
190
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
191 # Produce 90dpi PNGs for the web.
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
192
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
193 %.png: %.svg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
194 inkscape -D -e $@ $<
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
195
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
196 %.svg: %.dot
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
197 dot -Tsvg -o $@ $<
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
198
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
199 # Produce eps & pdf for the pdf
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
200
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
201 %.pdf: %.eps
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
202 epstopdf $<
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
203
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
204 %.eps: %.svg
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
205 inkscape -E $@ $<
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
206
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
207 %.eps: %.dot
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
208 dot -Tps -o $@ $<
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
209
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
210 %.eps: %.png
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
211 convert $< ps:$@
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
212
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
213 examples: $(example-prereqs) examples/.run
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
214
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
215 examples/.run: $(example-sources:%=examples/%.run)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
216 touch examples/.run
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
217
789
4cf1bbfe4d2c restore the script to generate examples for tex.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 777
diff changeset
218 examples/%.run: examples/% examples/run-example-tex
4cf1bbfe4d2c restore the script to generate examples for tex.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 777
diff changeset
219 cd examples && ./run-example-tex $(notdir $<)
777
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
220
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
221 changelog := $(wildcard ../.hg/store/00changelog.[id])
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
222 ifeq ($(changelog),)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
223 changelog := $(wildcard ../.hg/00changelog.[id])
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
224 endif
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
225
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
226 build_id.tex: $(changelog)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
227 echo -n '$(hg-id)' > build_id.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
228
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
229 hg_id.tex: $(hg)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
230 echo -n '$(hg-version)' > hg_id.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
231
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
232 clean:
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
233 rm -rf dist html pdf \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
234 $(image-dot:%.dot=%.pdf) \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
235 $(image-dot:%.dot=%.png) \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
236 $(image-svg:%.svg=%.pdf) \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
237 $(image-svg:%.svg=%.png) \
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
238 examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
239
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
240 install: pdf split $(dist-sources)
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
241 rm -rf dist
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
242 mkdir -p dist
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
243 cp pdf/hgbook.pdf dist
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
244 cp html/split/*.{css,html,png} dist
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
245 cp $(dist-sources) dist
3274ff6650df add old Makefile for tex compilation
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
246