Mercurial > hgbook
comparison en/Makefile @ 369:73aa295a40da
- build fix for en
- more collab.tex
- small correction in mq-ref.tex
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 07 Dec 2008 14:18:38 +0900 |
parents | dc3d42f3a288 |
children | 019040fbf5f5 |
comparison
equal
deleted
inserted
replaced
368:7ef84661e43e | 369:73aa295a40da |
---|---|
53 image-svg := $(filter %.svg,$(image-sources)) | 53 image-svg := $(filter %.svg,$(image-sources)) |
54 image-png := $(filter %.png,$(image-sources)) | 54 image-png := $(filter %.png,$(image-sources)) |
55 | 55 |
56 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) | 56 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) |
57 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) | 57 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) |
58 #image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png) | |
59 image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png:%.png=%.eps) | |
58 | 60 |
59 example-sources := \ | 61 example-sources := \ |
60 backout \ | 62 backout \ |
61 bisect \ | 63 bisect \ |
62 branching \ | 64 branching \ |
106 hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n') | 108 hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n') |
107 | 109 |
108 hg-version = $(shell hg version -q | \ | 110 hg-version = $(shell hg version -q | \ |
109 sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,') | 111 sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,') |
110 | 112 |
111 all: pdf html | 113 all: dvi |
114 | |
115 #dvi: $(sources) $(image-eps) examples | |
116 dvi: $(sources) $(image-eps) | |
117 platex 00book.tex | |
118 | |
119 cp 00book.aux hgbook.aux | |
120 bibtex hgbook | |
121 | |
122 platex 00book.tex | |
123 platex 00book.tex | |
124 platex 00book.tex | |
125 | |
126 | |
127 | |
128 | |
129 | |
112 | 130 |
113 pdf: pdf/hgbook.pdf | 131 pdf: pdf/hgbook.pdf |
114 | 132 |
115 define pdf | 133 define pdf |
116 mkdir -p $(dir $@) | 134 mkdir -p $(dir $@) |
117 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) | 135 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) |
136 | |
118 cp 99book.bib $(dir $@) | 137 cp 99book.bib $(dir $@) |
138 | |
119 cd $(dir $@) && bibtex $(basename $(notdir $@)) | 139 cd $(dir $@) && bibtex $(basename $(notdir $@)) |
120 cd $(dir $@) && makeindex $(basename $(notdir $@)) | 140 cd $(dir $@) && makeindex $(basename $(notdir $@)) |
141 | |
121 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) | 142 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) |
122 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) | 143 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) |
123 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi | 144 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi |
124 endef | 145 endef |
125 | 146 |
126 pdf/hgbook.pdf: $(sources) $(image-pdf) examples | 147 #pdf/hgbook.pdf: $(sources) $(image-pdf) examples |
148 pdf/hgbook.pdf: $(sources) $(image-pdf) | |
127 $(call pdf) | 149 $(call pdf) |
128 | 150 |
129 html: onepage split | 151 html: onepage split |
130 | 152 |
131 onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) | 153 onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) |
151 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) | 173 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) |
152 ./fixhtml.py $(dir $(1))/*.html | 174 ./fixhtml.py $(dir $(1))/*.html |
153 rm $(dir $(1))/hgbook.css | 175 rm $(dir $(1))/hgbook.css |
154 endef | 176 endef |
155 | 177 |
156 html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg | 178 #html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg |
179 html/onepage/hgbook.html: $(sources) $(image-html) bookhtml.cfg | |
157 $(call htlatex,$@,$<) | 180 $(call htlatex,$@,$<) |
158 | 181 |
159 html/split/hgbook.html: $(sources) examples bookhtml.cfg | 182 #html/split/hgbook.html: $(sources) examples bookhtml.cfg |
183 html/split/hgbook.html: $(sources) bookhtml.cfg | |
160 $(call htlatex,$@,$<,2) | 184 $(call htlatex,$@,$<,2) |
161 | 185 |
162 # Produce 90dpi PNGs for the web. | 186 # Produce 90dpi PNGs for the web. |
163 | 187 |
164 %.png: %.svg | 188 %.png: %.svg |
175 %.eps: %.svg | 199 %.eps: %.svg |
176 inkscape -E $@ $< | 200 inkscape -E $@ $< |
177 | 201 |
178 %.eps: %.dot | 202 %.eps: %.dot |
179 dot -Tps -o $@ $< | 203 dot -Tps -o $@ $< |
204 | |
205 %.eps: %.png | |
206 convert $< ps:$@ | |
180 | 207 |
181 examples: $(example-prereqs) examples/.run | 208 examples: $(example-prereqs) examples/.run |
182 | 209 |
183 examples/.run: $(example-sources:%=examples/%.run) | 210 examples/.run: $(example-sources:%=examples/%.run) |
184 touch examples/.run | 211 touch examples/.run |
210 mkdir -p dist | 237 mkdir -p dist |
211 cp pdf/hgbook.pdf dist | 238 cp pdf/hgbook.pdf dist |
212 cp html/split/*.{css,html,png} dist | 239 cp html/split/*.{css,html,png} dist |
213 cp $(dist-sources) dist | 240 cp $(dist-sources) dist |
214 | 241 |
215 rsync: install | |
216 rsync -avz --delete dist sp.red-bean.com:public_html/hgbook |