# Don't print the ps, printers (eg ours!) don't always have the fonts
+use_rsvg=rsvg-convert -f png -o $@.tmp.png $<
+shell_pipe=set -o pipefail; set -e;
+make_pgm = pnmdepth 255 | pnmnoraw >$@.tmp.new; mv -f $@.tmp.new $@
+
pumpkin-books.ps: pumpkin-books.ps.pl bag.pgm
./$< >$@.new && mv -f $@.new $@
-sDEVICE=pdfwrite -sOutputFile=$@ $<
bag.pgm: Sack_-_Sac_-_Zak_brown.svg Makefile
- rsvg-convert -f png -o $@.tmp.png $<
- set -o pipefail; set -e; \
+ $(use_rsvg)
+ $(shell_pipe) \
pngtopnm <$@.tmp.png -mix -background 'white' \
| ppmtopgm \
- | pnmdepth 255 \
- | pnmnoraw >$@.tmp.new
- mv -f $@.tmp.new $@
+ | $(make_pgm)
pubssh=c