hgbook
diff en/Makefile @ 21:ce3339dbeb6f
Get beta feedback stuff into better shape.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed Jul 05 00:14:15 2006 -0700 (2006-07-05) |
parents | e6f4088ebe52 |
children | a752b0fd3c10 |
line diff
1.1 --- a/en/Makefile Tue Jul 04 16:41:31 2006 -0700 1.2 +++ b/en/Makefile Wed Jul 05 00:14:15 2006 -0700 1.3 @@ -1,6 +1,6 @@ 1.4 # This makefile requires GNU make. 1.5 1.6 -hg_id := $(shell hg id 2>/dev/null | sed -e 's/ tip\>//' -e 's/ /,/g' || echo external) 1.7 +hg_id := $(shell hg parents --template '{node|short}' | head -1) 1.8 1.9 sources := \ 1.10 00book.tex \ 1.11 @@ -29,12 +29,12 @@ 1.12 1.13 define pdf 1.14 mkdir -p $(dir $@) 1.15 - pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.16 + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.17 cp 99book.bib $(dir $@) 1.18 cd $(dir $@) && bibtex $(basename $(notdir $@)) 1.19 cd $(dir $@) && makeindex $(basename $(notdir $@)) 1.20 - pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.21 - pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.22 + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.23 + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.24 endef 1.25 1.26 pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%_pdf.png) examples 1.27 @@ -56,7 +56,7 @@ 1.28 head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book 1.29 echo 'echo status $$$$' >> $(dir $(1))/htlatex.book 1.30 chmod 755 $(dir $(1))/htlatex.book 1.31 - $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) 1.32 + TEXINPUTS=$(dir $(2)): $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) 1.33 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf 1.34 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) 1.35 perl -pi -e 's/�([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html