annotate en/Makefile @ 121:9094c9fda8ec

Start chapter on error recovery.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 15 Nov 2006 15:59:41 -0800
parents 1ee53cb37a99
children 3af28630fe8c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
1 # This makefile requires GNU make.
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
2
69
e9dd634ab99e hg_id is a one-liner. Pipe to head is superfluous
Guy Brand <gb@isis.u-strasbg.fr>
parents: 59
diff changeset
3 hg_id := $(shell hg parents --template '{node|short}\n')
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
4
2
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
5 sources := \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
6 00book.tex \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
7 99book.bib \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
8 99defs.tex \
34
c0979ed1eabd Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 32
diff changeset
9 build_id.tex \
59
0aae9d676e0f Merge with jeffpc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 50 58
diff changeset
10 concepts.tex \
42
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 34
diff changeset
11 daily.tex \
34
c0979ed1eabd Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 32
diff changeset
12 hook.tex \
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
13 intro.tex \
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
14 mq.tex \
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
15 mq-collab.tex \
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
16 mq-ref.tex \
76
df88df78288d Add template chapter to build.
Bryan O'Sullivan <bos@serpentine.com>
parents: 69
diff changeset
17 preface.tex \
85
b7c69a68b0cc A little progress on "lightning tour".
Bryan O'Sullivan <bos@serpentine.com>
parents: 84
diff changeset
18 srcinstall.tex \
84
43b9793b4e38 Begin tour chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 83
diff changeset
19 template.tex \
95
47ea206351d5 Split tour into two sections.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
20 tour-basic.tex \
121
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
21 tour-merge.tex \
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
22 undo.tex
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
24 image-sources := \
108
e0b961975c5e First bit of concepts chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 104
diff changeset
25 filelog.svg \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
26 kdiff3.png \
109
1b67dc96f27a Snapshot of concepts chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 108
diff changeset
27 metadata.svg \
96
7d7ddc3a57af Split tour into two chapters.
Bryan O'Sullivan <bos@serpentine.com>
parents: 95
diff changeset
28 mq-stack.svg \
112
2fcead053b7a More. Concept. Fun.
Bryan O'Sullivan <bos@serpentine.com>
parents: 110
diff changeset
29 revlog.svg \
110
75c076c7a374 More concepts stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 109
diff changeset
30 snapshot.svg \
99
06383f9e46e4 More graphics.
Bryan O'Sullivan <bos@serpentine.com>
parents: 96
diff changeset
31 tour-history.svg \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
32 tour-merge-conflict.svg \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
33 tour-merge-merge.svg \
100
272146fab009 Add yet another illustration of the merge process.
Bryan O'Sullivan <bos@serpentine.com>
parents: 99
diff changeset
34 tour-merge-pull.svg \
113
a0f57b3e677e More concepts, this time working directory stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 112
diff changeset
35 tour-merge-sep-repos.svg \
a0f57b3e677e More concepts, this time working directory stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 112
diff changeset
36 wdir.svg \
115
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
37 wdir-after-commit.svg \
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
38 wdir-branch.svg \
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
39 wdir-merge.svg \
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
40 wdir-pre-branch.svg
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
41
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
42 image-svg := $(filter %.svg,$(image-sources))
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
43
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
44 example-sources := \
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 115
diff changeset
45 daily.copy \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
46 daily.files \
118
1ee53cb37a99 More progress on daily work.
Bryan O'Sullivan <bos@serpentine.com>
parents: 117
diff changeset
47 daily.rename \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
48 hook.msglen \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
49 hook.simple \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
50 hook.ws \
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
51 mq.guards \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
52 mq.qinit-help \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
53 mq.dodiff \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
54 mq.id \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
55 mq.tarball \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
56 mq.tools \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
57 mq.tutorial \
121
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
58 rollback \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
59 template.simple \
87
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents: 86
diff changeset
60 template.svnstyle \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
61 tour \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
62 tour-merge-conflict
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
63
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
64 latex-options = \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
65 -interaction batchmode \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
66 -output-directory $(dir $(1)) \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
67 -jobname $(basename $(notdir $(1)))
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
68
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
69 all: pdf html
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
70
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
71 pdf: pdf/hgbook.pdf
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
72
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
73 define pdf
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
74 mkdir -p $(dir $@)
21
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
75 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
2
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
76 cp 99book.bib $(dir $@)
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
77 cd $(dir $@) && bibtex $(basename $(notdir $@))
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
78 cd $(dir $@) && makeindex $(basename $(notdir $@))
21
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
79 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
80 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
26
1bc6c1f0192a More MQ content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 24
diff changeset
81 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
82 endef
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
83
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
84 pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%.pdf) examples
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
85 $(call pdf)
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
86
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
87 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
88
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
89 # This is a horrible hack to work around the fact that the htlatex
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
90 # command in tex4ht is itself a horrible hack. I really don't want to
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
91 # include verbatim the big wad of TeX that is repeated in that script,
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
92 # so instead I mangle the script itself.
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
93
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
94 define htlatex
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
95 mkdir -p $(dir $(1))
7
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
96 head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
97 cp 99book.bib $(dir $@)
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
98 echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
99 echo '(cd $(dir $@) && makeindex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
7
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
100 head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
101 echo 'echo status $$$$' >> $(dir $(1))/htlatex.book
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
102 chmod 755 $(dir $(1))/htlatex.book
21
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
103 TEXINPUTS=$(dir $(2)): $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
104 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
105 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
7
339e75288632 More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4
diff changeset
106 perl -pi -e 's/&#x00([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
107 endef
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
108
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
109 html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
110 $(call htlatex,$@,$<)
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
111 cp $(image-sources:%.svg=%.png) $(dir $@)
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
112
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
113 html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
114 $(call htlatex,$@,$<,2)
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
115 cp $(image-sources:%.svg=%.png) $(dir $@)
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
116
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
117 beta: beta/pdf/hgbook.pdf beta/html/onepage/hgbook.html beta/html/split/hgbook.html
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
118
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
119 beta/%.tex: %.tex
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
120 ./fblinks $(hg_id) $(dir $@) $<
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
121
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
122 beta/pdf/hgbook.pdf: $(sources:%.tex=beta/%.tex) $(image-sources:%.svg=%.pdf) examples fblinks
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
123 $(call pdf)
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
124
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
125 beta/html/onepage/hgbook.html: $(sources:%.tex=beta/%.tex) $(image-sources:%.svg=%.png) examples
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
126 $(call htlatex,$@,$<)
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
127 cp $(image-sources:%.svg=%.png) $(dir $@)
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
128
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
129 beta/html/split/hgbook.html: $(sources:%.tex=beta/%.tex) $(image-sources:%.svg=%.png) examples
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
130 $(call htlatex,$@,$<,2)
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
131 cp $(image-sources:%.svg=%.png) $(dir $@)
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
132
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
133 # Produce 90dpi PNGs for the web.
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
134
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
135 %.png: %.svg
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
136 inkscape -D -e $@ $<
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
137
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
138 # Produce eps & pdf for the pdf
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
139
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
140 %.pdf: %.eps
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
141 epstopdf $<
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
142
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
143 %.eps: %.svg
32
b7d46e86a5f1 Stop inkscape from printing an annoying message.
Bryan O'Sullivan <bos@serpentine.com>
parents: 31
diff changeset
144 inkscape -E $@ $<
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
145
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
146 examples: examples/.run
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
147
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
148 examples/.run: $(example-sources:%=examples/%.run)
45
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
149 touch examples/.run
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
150
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
151 examples/%.run: examples/% examples/run-example
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
152 cd examples && ./run-example $(notdir $<)
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
153
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
154 build_id.tex: $(wildcard ../.hg/00changelog.[id])
29
6e988159394b Add revision ID to output.
Bryan O'Sullivan <bos@serpentine.com>
parents: 26
diff changeset
155 echo -n $(hg_id) > build_id.tex
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
156
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
157 clean:
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
158 rm -rf beta html pdf \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
159 $(image-svg:%.svg=%.pdf) \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
160 $(image-svg:%.svg=%.png) \
46
dd657c4d3a47 Rename mq.diff to mq.dodiff Emacs won't screw up the syntax highlighting.
Bryan O'Sullivan <bos@serpentine.com>
parents: 45
diff changeset
161 examples/*.{out,run} examples/.run build_id.tex