hgbook
diff en/Makefile @ 4:33a2e7b9978d
Make it possible to include example input and output from real programs.
Instead of having to cut and paste example text, the task is automated.
Instead of having to cut and paste example text, the task is automated.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun Jun 25 22:04:50 2006 -0700 (2006-06-25) |
parents | 379a802c0210 |
children | 339e75288632 |
line diff
1.1 --- a/en/Makefile Sat Jun 24 16:14:02 2006 -0700 1.2 +++ b/en/Makefile Sun Jun 25 22:04:50 2006 -0700 1.3 @@ -4,6 +4,10 @@ 1.4 99defs.tex \ 1.5 mq.tex 1.6 1.7 +example-sources := \ 1.8 + examples/run-example \ 1.9 + examples/mq.qinit-help 1.10 + 1.11 latex-options = \ 1.12 -interaction batchmode \ 1.13 -output-directory $(dir $(1)) \ 1.14 @@ -13,7 +17,7 @@ 1.15 1.16 pdf: pdf/hgbook.pdf 1.17 1.18 -pdf/hgbook.pdf: $(sources) 1.19 +pdf/hgbook.pdf: $(sources) examples 1.20 mkdir -p $(dir $@) 1.21 pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 1.22 cp 99book.bib $(dir $@) 1.23 @@ -32,11 +36,18 @@ 1.24 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) 1.25 endef 1.26 1.27 -html/onepage/hgbook.html: $(sources) 1.28 +html/onepage/hgbook.html: $(sources) examples 1.29 $(call htlatex,$@,$<) 1.30 1.31 -html/split/hgbook.html: $(sources) 1.32 +html/split/hgbook.html: $(sources) examples 1.33 $(call htlatex,$@,$<,2) 1.34 1.35 +.PHONY: examples 1.36 + 1.37 +examples: examples/.run 1.38 + 1.39 +examples/.run: $(example-sources) 1.40 + cd examples && ./run-example 1.41 + 1.42 clean: 1.43 rm -rf html pdf *.aux *.dvi *.log *.out