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