hgbook

diff en/Makefile @ 11:e9d5b4c3d16b

First SVG image!
author Bryan O'Sullivan <bos@serpentine.com>
date Thu Jun 29 00:32:35 2006 -0700 (2006-06-29)
parents 339e75288632
children 81454425eee9
line diff
     1.1 --- a/en/Makefile	Mon Jun 26 12:25:11 2006 -0700
     1.2 +++ b/en/Makefile	Thu Jun 29 00:32:35 2006 -0700
     1.3 @@ -4,6 +4,9 @@
     1.4  	99defs.tex \
     1.5  	mq.tex
     1.6  
     1.7 +image-sources := \
     1.8 +	mq-stack.svg
     1.9 +
    1.10  example-sources := \
    1.11  	examples/run-example \
    1.12  	examples/mq.qinit-help \
    1.13 @@ -18,7 +21,7 @@
    1.14  
    1.15  pdf: pdf/hgbook.pdf
    1.16  
    1.17 -pdf/hgbook.pdf: $(sources) examples
    1.18 +pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%_pdf.png) examples
    1.19  	mkdir -p $(dir $@)
    1.20  	pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
    1.21  	cp 99book.bib $(dir $@)
    1.22 @@ -42,13 +45,22 @@
    1.23  	perl -pi -e 's/&#x00([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html
    1.24  endef
    1.25  
    1.26 -html/onepage/hgbook.html: $(sources) examples
    1.27 +html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
    1.28  	$(call htlatex,$@,$<)
    1.29 +	cp $(image-sources:%.svg=%.png) $(dir $@)
    1.30  
    1.31 -html/split/hgbook.html: $(sources) examples
    1.32 +html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
    1.33  	$(call htlatex,$@,$<,2)
    1.34 +	cp $(image-sources:%.svg=%.png) $(dir $@)
    1.35  
    1.36 -.PHONY: examples
    1.37 +%.png: %.svg
    1.38 +	inkscape -D -e $@ $<
    1.39 +
    1.40 +%_pdf.png: %.svg
    1.41 +	inkscape -D -d 300 -e $@ $<
    1.42 +
    1.43 +%.eps: %.svg
    1.44 +	inkscape -E $@ $<
    1.45  
    1.46  examples: examples/.run
    1.47  
    1.48 @@ -56,4 +68,4 @@
    1.49  	cd examples && ./run-example
    1.50  
    1.51  clean:
    1.52 -	rm -rf html pdf *.aux *.dvi *.log *.out examples/*.out examples/.run
    1.53 +	rm -rf html pdf *.eps *.png *.aux *.dvi *.log *.out examples/*.out examples/.run