comparison ja/Makefile @ 292:f72e4be6dd37

intermediate commit.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 07 Feb 2008 18:56:42 +0900
parents b0db5adf11c1
children 32d33b238b7e
comparison
equal deleted inserted replaced
291:504f23b4f625 292:f72e4be6dd37
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)
58 59
59 example-sources := \ 60 example-sources := \
60 backout \ 61 backout \
61 bisect \ 62 bisect \
62 branching \ 63 branching \
106 hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n') 107 hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
107 108
108 hg-version = $(shell hg version -q | \ 109 hg-version = $(shell hg version -q | \
109 sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,') 110 sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
110 111
111 all: pdf html 112 all: dvi
113
114 dvi: $(sources) $(image-eps) examples
115 platex 00book.tex
116
117 bibtex hgbook
118
119 platex 00book.tex
120 platex 00book.tex
121 platex 00book.tex
122
123
124
125
126
112 127
113 pdf: pdf/hgbook.pdf 128 pdf: pdf/hgbook.pdf
114 129
115 define pdf 130 define pdf
116 mkdir -p $(dir $@) 131 mkdir -p $(dir $@)
117 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 132 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
133
118 cp 99book.bib $(dir $@) 134 cp 99book.bib $(dir $@)
135
119 cd $(dir $@) && bibtex $(basename $(notdir $@)) 136 cd $(dir $@) && bibtex $(basename $(notdir $@))
120 cd $(dir $@) && makeindex $(basename $(notdir $@)) 137 cd $(dir $@) && makeindex $(basename $(notdir $@))
138
121 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 139 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
122 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 140 TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
123 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi 141 if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
124 endef 142 endef
125 143
210 mkdir -p dist 228 mkdir -p dist
211 cp pdf/hgbook.pdf dist 229 cp pdf/hgbook.pdf dist
212 cp html/split/*.{css,html,png} dist 230 cp html/split/*.{css,html,png} dist
213 cp $(dist-sources) dist 231 cp $(dist-sources) dist
214 232
215 rsync: install
216 rsync -avz --delete dist sp.red-bean.com:public_html/hgbook