don't fail on an empty graph key
[PyX.git] / examples / Makefile
blobd90f319219c376591f280ed6540b676967525686
1 default: examples.dvi
3 clean:
4 -rm -f examples.tex examples.log examples.aux examples.dvi *.eps */*.eps *.pdf */*.pdf *.png */*.png
6 all:
7 make clean
8 make examples.dvi
9 make png
11 dvi: examples.dvi
13 files = $(foreach item, $(shell grep -v / INDEX), $(item)) $(foreach item, $(shell grep / INDEX), $(addprefix $(item), $(shell cat $(item)INDEX)))
14 pyfiles = $(addsuffix .py, $(files))
15 epsfiles = $(addsuffix .eps, $(files))
16 pngfiles = $(addsuffix .png, $(files))
17 thumbpngfiles = $(addsuffix _thumb.png, $(files))
19 eps: $(epsfiles)
21 examples.dvi: examples.py $(epsfiles)
22 python examples.py $(basename $(pyfiles))
23 latex examples.tex
25 png: $(pngfiles) $(thumbpngfiles)
27 %.eps: %.py
28 cd $(dir $^); PYTHONPATH=$(CURDIR)/.. python $(notdir $^)
30 misc/pattern.png: misc/pattern.eps
31 gs -r400 -dEPSCrop -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pnm -sOutputFile=- $^|pnmscale 0.25|pnmtopng -transparent 'rgb:ff/ff/ff' > $@
33 misc/pattern_thumb.png: misc/pattern.eps
34 gs -r200 -dEPSCrop -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pnm -sOutputFile=- $^|pnmscale 0.25|pnmtopng -transparent 'rgb:ff/ff/ff' > $@
36 %.png: %.eps
37 gs -r100 -dEPSCrop -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=$@ $^
39 %_thumb.png: %.eps
40 gs -r50 -dEPSCrop -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=$@ $^