Mercurial > hgbook
comparison en/Makefile @ 124:c9aad709bd3a
Document the backout command.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 26 Dec 2006 13:08:20 -0800 |
parents | 3af28630fe8c |
children | 153efeaa8f57 |
comparison
equal
deleted
inserted
replaced
123:f954c6f6eaa1 | 124:c9aad709bd3a |
---|---|
31 tour-history.svg \ | 31 tour-history.svg \ |
32 tour-merge-conflict.svg \ | 32 tour-merge-conflict.svg \ |
33 tour-merge-merge.svg \ | 33 tour-merge-merge.svg \ |
34 tour-merge-pull.svg \ | 34 tour-merge-pull.svg \ |
35 tour-merge-sep-repos.svg \ | 35 tour-merge-sep-repos.svg \ |
36 undo-manual.dot \ | |
37 undo-manual-merge.dot \ | |
38 undo-non-tip.dot \ | |
39 undo-simple.dot \ | |
36 wdir.svg \ | 40 wdir.svg \ |
37 wdir-after-commit.svg \ | 41 wdir-after-commit.svg \ |
38 wdir-branch.svg \ | 42 wdir-branch.svg \ |
39 wdir-merge.svg \ | 43 wdir-merge.svg \ |
40 wdir-pre-branch.svg | 44 wdir-pre-branch.svg |
41 | 45 |
46 image-dot := $(filter %.dot,$(image-sources)) | |
42 image-svg := $(filter %.svg,$(image-sources)) | 47 image-svg := $(filter %.svg,$(image-sources)) |
48 image-png := $(filter %.png,$(image-sources)) | |
43 | 49 |
44 example-sources := \ | 50 example-sources := \ |
51 backout \ | |
45 daily.copy \ | 52 daily.copy \ |
46 daily.files \ | 53 daily.files \ |
47 daily.rename \ | 54 daily.rename \ |
48 daily.revert \ | 55 daily.revert \ |
49 hook.msglen \ | 56 hook.msglen \ |
80 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) | 87 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) |
81 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) | 88 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) |
82 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi | 89 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi |
83 endef | 90 endef |
84 | 91 |
85 pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%.pdf) examples | 92 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) |
93 | |
94 pdf/hgbook.pdf: $(sources) $(image-pdf) examples | |
86 $(call pdf) | 95 $(call pdf) |
87 | 96 |
88 html: html/onepage/hgbook.html html/split/hgbook.html | 97 html: html/onepage/hgbook.html html/split/hgbook.html |
89 | 98 |
90 # This is a horrible hack to work around the fact that the htlatex | 99 # This is a horrible hack to work around the fact that the htlatex |
105 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf | 114 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf |
106 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) | 115 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) |
107 perl -pi -e 's/�([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html | 116 perl -pi -e 's/�([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html |
108 endef | 117 endef |
109 | 118 |
110 html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples | 119 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) |
120 | |
121 html/onepage/hgbook.html: $(sources) $(image-html) examples | |
111 $(call htlatex,$@,$<) | 122 $(call htlatex,$@,$<) |
112 cp $(image-sources:%.svg=%.png) $(dir $@) | 123 cp $(image-sources:%.svg=%.png) $(dir $@) |
113 | 124 |
114 html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples | 125 html/split/hgbook.html: $(sources) $(image-html) examples |
115 $(call htlatex,$@,$<,2) | 126 $(call htlatex,$@,$<,2) |
116 cp $(image-sources:%.svg=%.png) $(dir $@) | 127 cp $(image-sources:%.svg=%.png) $(dir $@) |
117 | 128 |
118 beta: beta/pdf/hgbook.pdf beta/html/onepage/hgbook.html beta/html/split/hgbook.html | 129 beta: beta/pdf/hgbook.pdf beta/html/onepage/hgbook.html beta/html/split/hgbook.html |
119 | 130 |
134 # Produce 90dpi PNGs for the web. | 145 # Produce 90dpi PNGs for the web. |
135 | 146 |
136 %.png: %.svg | 147 %.png: %.svg |
137 inkscape -D -e $@ $< | 148 inkscape -D -e $@ $< |
138 | 149 |
150 %.svg: %.dot | |
151 dot -Tsvg -o $@ $< | |
152 | |
139 # Produce eps & pdf for the pdf | 153 # Produce eps & pdf for the pdf |
140 | 154 |
141 %.pdf: %.eps | 155 %.pdf: %.eps |
142 epstopdf $< | 156 epstopdf $< |
143 | 157 |
144 %.eps: %.svg | 158 %.eps: %.svg |
145 inkscape -E $@ $< | 159 inkscape -E $@ $< |
160 | |
161 %.eps: %.dot | |
162 dot -Tps -o $@ $< | |
146 | 163 |
147 examples: examples/.run | 164 examples: examples/.run |
148 | 165 |
149 examples/.run: $(example-sources:%=examples/%.run) | 166 examples/.run: $(example-sources:%=examples/%.run) |
150 touch examples/.run | 167 touch examples/.run |
155 build_id.tex: $(wildcard ../.hg/00changelog.[id]) | 172 build_id.tex: $(wildcard ../.hg/00changelog.[id]) |
156 echo -n $(hg_id) > build_id.tex | 173 echo -n $(hg_id) > build_id.tex |
157 | 174 |
158 clean: | 175 clean: |
159 rm -rf beta html pdf \ | 176 rm -rf beta html pdf \ |
177 $(image-dot:%.dot=%.pdf) \ | |
178 $(image-dot:%.dot=%.png) \ | |
160 $(image-svg:%.svg=%.pdf) \ | 179 $(image-svg:%.svg=%.pdf) \ |
161 $(image-svg:%.svg=%.png) \ | 180 $(image-svg:%.svg=%.png) \ |
162 examples/*.{out,run} examples/.run build_id.tex | 181 examples/*.{out,run} examples/.run build_id.tex |