chiark / gitweb /
prep for ppm
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 Oct 2021 23:43:49 +0000 (00:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 Oct 2021 23:43:49 +0000 (00:43 +0100)
Makefile

index dfab89336922b27863c0c090bba0c3b6a3fd1b6d..2ffbfb1e8f4da5b73e01b3863394d279aecca3d8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,12 +7,13 @@ all:  pumpkin-books.pdf
 
 # Don't print the ps, printers (eg ours!) don't always have the fonts
 
+o=>$@.new && mv -f $@.new $@
 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 $@
+make_pnm = pnmdepth 255 | pnmnoraw $o
 
 pumpkin-books.ps: pumpkin-books.ps.pl bag.pgm pot.pgm
-       ./$< >$@.new && mv -f $@.new $@
+       ./$< $o
 
 pumpkin-books.pdf: pumpkin-books.ps
        gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress \
@@ -23,7 +24,7 @@ bag.pgm: Sack_-_Sac_-_Zak_brown.svg Makefile
        $(shell_pipe)                                   \
        pngtopnm <$@.tmp.png -mix -background 'white'   \
        | ppmtopgm                                      \
-       | $(make_pgm)
+       | $(make_pnm)
 
 pot.pgm: 146_Kaldrono.svg Makefile
        $(use_rsvg)
@@ -31,7 +32,7 @@ pot.pgm: 146_Kaldrono.svg Makefile
        pngtopnm <$@.tmp.png                            \
        | ppmtopgm                                      \
        | pnminvert                                     \
-       | $(make_pgm)
+       | $(make_pnm)
 
 pubssh=c
 pubpath=games-rules/quacks