annotate en/Makefile @ 177:c54f4c106fd5

Record the version of Mercurial used.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 28 Mar 2007 23:01:57 -0700
parents 5f305adeb584
children 5fc4a45c069f
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
2
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
3 sources := \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
4 00book.tex \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
5 99book.bib \
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
6 99defs.tex \
34
c0979ed1eabd Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 32
diff changeset
7 build_id.tex \
132
e1e2f3e0256a Start command reference, with the diff command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
8 cmdref.tex \
159
7355af913937 First steps on collaboration chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 157
diff changeset
9 collab.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 \
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
12 filenames.tex \
177
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
13 hg_id.tex \
34
c0979ed1eabd Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 32
diff changeset
14 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
15 intro.tex \
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents: 11
diff changeset
16 mq.tex \
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
17 mq-collab.tex \
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
18 mq-ref.tex \
76
df88df78288d Add template chapter to build.
Bryan O'Sullivan <bos@serpentine.com>
parents: 69
diff changeset
19 preface.tex \
85
b7c69a68b0cc A little progress on "lightning tour".
Bryan O'Sullivan <bos@serpentine.com>
parents: 84
diff changeset
20 srcinstall.tex \
84
43b9793b4e38 Begin tour chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 83
diff changeset
21 template.tex \
95
47ea206351d5 Split tour into two sections.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
22 tour-basic.tex \
121
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
23 tour-merge.tex \
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
24 undo.tex
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
25
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
26 image-sources := \
108
e0b961975c5e First bit of concepts chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 104
diff changeset
27 filelog.svg \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
28 kdiff3.png \
109
1b67dc96f27a Snapshot of concepts chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 108
diff changeset
29 metadata.svg \
96
7d7ddc3a57af Split tour into two chapters.
Bryan O'Sullivan <bos@serpentine.com>
parents: 95
diff changeset
30 mq-stack.svg \
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
31 note.png \
112
2fcead053b7a More. Concept. Fun.
Bryan O'Sullivan <bos@serpentine.com>
parents: 110
diff changeset
32 revlog.svg \
110
75c076c7a374 More concepts stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 109
diff changeset
33 snapshot.svg \
99
06383f9e46e4 More graphics.
Bryan O'Sullivan <bos@serpentine.com>
parents: 96
diff changeset
34 tour-history.svg \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
35 tour-merge-conflict.svg \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
36 tour-merge-merge.svg \
100
272146fab009 Add yet another illustration of the merge process.
Bryan O'Sullivan <bos@serpentine.com>
parents: 99
diff changeset
37 tour-merge-pull.svg \
113
a0f57b3e677e More concepts, this time working directory stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 112
diff changeset
38 tour-merge-sep-repos.svg \
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
39 undo-manual.dot \
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
40 undo-manual-merge.dot \
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
41 undo-non-tip.dot \
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
42 undo-simple.dot \
113
a0f57b3e677e More concepts, this time working directory stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents: 112
diff changeset
43 wdir.svg \
115
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
44 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
45 wdir-branch.svg \
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
46 wdir-merge.svg \
b74102b56df5 Wow! Lots more work detailing the working directory, merging, etc.
Bryan O'Sullivan <bos@serpentine.com>
parents: 113
diff changeset
47 wdir-pre-branch.svg
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
48
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
49 image-dot := $(filter %.dot,$(image-sources))
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
50 image-svg := $(filter %.svg,$(image-sources))
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
51 image-png := $(filter %.png,$(image-sources))
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
52
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
53 example-sources := \
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
54 backout \
131
153efeaa8f57 Fix stupid build bugs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 124
diff changeset
55 bisect \
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
56 cmdref \
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 115
diff changeset
57 daily.copy \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
58 daily.files \
118
1ee53cb37a99 More progress on daily work.
Bryan O'Sullivan <bos@serpentine.com>
parents: 117
diff changeset
59 daily.rename \
122
3af28630fe8c How to goodbye depression by reverting one thousand times daily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 121
diff changeset
60 daily.revert \
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents: 132
diff changeset
61 filenames \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
62 hook.msglen \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
63 hook.simple \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
64 hook.ws \
156
91a936be78b8 Document merge behaviour with file names.
Bryan O'Sullivan <bos@serpentine.com>
parents: 153
diff changeset
65 issue29 \
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents: 103
diff changeset
66 mq.guards \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
67 mq.qinit-help \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
68 mq.dodiff \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
69 mq.id \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
70 mq.tarball \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
71 mq.tools \
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
72 mq.tutorial \
156
91a936be78b8 Document merge behaviour with file names.
Bryan O'Sullivan <bos@serpentine.com>
parents: 153
diff changeset
73 rename.divergent \
121
9094c9fda8ec Start chapter on error recovery.
Bryan O'Sullivan <bos@serpentine.com>
parents: 118
diff changeset
74 rollback \
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
75 template.simple \
87
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents: 86
diff changeset
76 template.svnstyle \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
77 tour \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
78 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
79
172
5f305adeb584 Try to tighten up the run environment to make things more reproducible.
Bryan O'Sullivan <bos@serpentine.com>
parents: 171
diff changeset
80 example-prereqs := \
5f305adeb584 Try to tighten up the run environment to make things more reproducible.
Bryan O'Sullivan <bos@serpentine.com>
parents: 171
diff changeset
81 /usr/bin/merge
5f305adeb584 Try to tighten up the run environment to make things more reproducible.
Bryan O'Sullivan <bos@serpentine.com>
parents: 171
diff changeset
82
157
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
83 dist-sources := \
159
7355af913937 First steps on collaboration chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 157
diff changeset
84 ../html/hgicon.png \
157
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
85 ../html/index.html.var \
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
86 ../html/index.en.html
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
87
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
88 latex-options = \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
89 -interaction batchmode \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
90 -output-directory $(dir $(1)) \
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
91 -jobname $(basename $(notdir $(1)))
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
92
177
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
93 hg = $(shell which hg)
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
94
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
95 hg-id = $(shell hg parents --template '{node|short}\n')
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
96
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
97 hg-version = $(shell hg version -q | \
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
98 sed 's,.*(version \(unknown\|[a-f0-9]*\)),\1,')
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
99
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
100 all: pdf html
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
101
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
102 pdf: pdf/hgbook.pdf
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
103
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
104 define pdf
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
105 mkdir -p $(dir $@)
21
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
106 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
2
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
107 cp 99book.bib $(dir $@)
379a802c0210 Add bibliography.
Bryan O'Sullivan <bos@serpentine.com>
parents: 0
diff changeset
108 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
109 cd $(dir $@) && makeindex $(basename $(notdir $@))
21
ce3339dbeb6f Get beta feedback stuff into better shape.
Bryan O'Sullivan <bos@serpentine.com>
parents: 18
diff changeset
110 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
111 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
112 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
113 endef
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
114
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
115 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
116
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
117 pdf/hgbook.pdf: $(sources) $(image-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
118 $(call pdf)
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
119
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
120 html: onepage split
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
121
171
8c1703a98266 Add a dependency on htlatex to HTML targets, even though we don't call it.
Bryan O'Sullivan <bos@serpentine.com>
parents: 170
diff changeset
122 htlatex := /usr/bin/htlatex
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
123
171
8c1703a98266 Add a dependency on htlatex to HTML targets, even though we don't call it.
Bryan O'Sullivan <bos@serpentine.com>
parents: 170
diff changeset
124 onepage: $(htlatex) html/onepage/hgbook.html
8c1703a98266 Add a dependency on htlatex to HTML targets, even though we don't call it.
Bryan O'Sullivan <bos@serpentine.com>
parents: 170
diff changeset
125
8c1703a98266 Add a dependency on htlatex to HTML targets, even though we don't call it.
Bryan O'Sullivan <bos@serpentine.com>
parents: 170
diff changeset
126 split: $(htlatex) html/split/hgbook.html
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
127
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
128 # 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
129 # 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
130 # include verbatim the big wad of TeX that is repeated in that script,
171
8c1703a98266 Add a dependency on htlatex to HTML targets, even though we don't call it.
Bryan O'Sullivan <bos@serpentine.com>
parents: 170
diff changeset
131 # but I've given up and run a hacked copy as htlatex.book here.
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
132
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
133 define htlatex
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
134 mkdir -p $(dir $(1))
170
9cd856b4bd21 Try to make HTML build a bit more portable.
Bryan O'Sullivan <bos@serpentine.com>
parents: 159
diff changeset
135 cp 99book.bib $(dir $(1))
9cd856b4bd21 Try to make HTML build a bit more portable.
Bryan O'Sullivan <bos@serpentine.com>
parents: 159
diff changeset
136 TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(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
137 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
138 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
139 ./fixhtml.py $(dir $(1))/*.html
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
140 endef
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
141
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
142 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
143
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
144 html/onepage/hgbook.html: $(sources) $(image-html) examples hgbook.css bookhtml.cfg
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
145 $(call htlatex,$@,$<)
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
146 cp $(image-sources:%.svg=%.png) $(dir $@)
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
147 cp hgbook.css $(dir $@)
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
148
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
149 html/split/hgbook.html: $(sources) $(image-html) examples hgbook.css bookhtml.cfg
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
150 $(call htlatex,$@,$<,2)
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
151 cp $(image-sources:%.svg=%.png) $(dir $@)
149
16f02802f448 Start to produce saner HTML and CSS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 146
diff changeset
152 cp hgbook.css $(dir $@)
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
153
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
154 # 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
155
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
156 %.png: %.svg
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
157 inkscape -D -e $@ $<
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
158
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
159 %.svg: %.dot
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
160 dot -Tsvg -o $@ $<
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
161
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
162 # 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
163
30
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
164 %.pdf: %.eps
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
165 epstopdf $<
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
166
cc1e6f1d7161 Use PDF instead of PNG for images in the PDF book
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents: 26
diff changeset
167 %.eps: %.svg
32
b7d46e86a5f1 Stop inkscape from printing an annoying message.
Bryan O'Sullivan <bos@serpentine.com>
parents: 31
diff changeset
168 inkscape -E $@ $<
11
e9d5b4c3d16b First SVG image!
Bryan O'Sullivan <bos@serpentine.com>
parents: 7
diff changeset
169
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
170 %.eps: %.dot
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
171 dot -Tps -o $@ $<
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
172
172
5f305adeb584 Try to tighten up the run environment to make things more reproducible.
Bryan O'Sullivan <bos@serpentine.com>
parents: 171
diff changeset
173 examples: $(example-prereqs) examples/.run
4
33a2e7b9978d Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2
diff changeset
174
86
796738d75876 Reduce verbosity.
Bryan O'Sullivan <bos@serpentine.com>
parents: 85
diff changeset
175 examples/.run: $(example-sources:%=examples/%.run)
45
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
176 touch examples/.run
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
177
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
178 examples/%.run: examples/% examples/run-example
6b7b0339e7d6 Don't rerun examples unnecessarily.
Bryan O'Sullivan <bos@serpentine.com>
parents: 44
diff changeset
179 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
180
18
e6f4088ebe52 Generate a PDF file with a feedback link on each paragraph.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
181 build_id.tex: $(wildcard ../.hg/00changelog.[id])
177
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
182 echo -n $(hg-id) > build_id.tex
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
183
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
184 hg_id.tex: $(hg)
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
185 echo -n $(hg-version) > hg_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
186
0
76fba5835a1b Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
187 clean:
153
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
188 rm -rf dist html pdf \
124
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
189 $(image-dot:%.dot=%.pdf) \
c9aad709bd3a Document the backout command.
Bryan O'Sullivan <bos@serpentine.com>
parents: 122
diff changeset
190 $(image-dot:%.dot=%.png) \
103
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
191 $(image-svg:%.svg=%.pdf) \
5b80c922ebdd More merge content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 100
diff changeset
192 $(image-svg:%.svg=%.png) \
177
c54f4c106fd5 Record the version of Mercurial used.
Bryan O'Sullivan <bos@serpentine.com>
parents: 172
diff changeset
193 examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
153
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
194
157
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
195 install: pdf split $(dist-sources)
153
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
196 rm -rf dist
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
197 mkdir -p dist
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
198 cp pdf/hgbook.pdf dist
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
199 cp html/split/*.{css,html,png} dist
157
e49f4451d0e3 Add hgbook front page material.
Bryan O'Sullivan <bos@serpentine.com>
parents: 156
diff changeset
200 cp $(dist-sources) dist
153
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
201
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
202 rsync: install
cf24633b8de7 Set up simple distribution rules.
Bryan O'Sullivan <bos@serpentine.com>
parents: 149
diff changeset
203 rsync -avz --delete dist sp.red-bean.com:public_html/hgbook