chiark / gitweb /
preview png, actually make it a png
[pandemic-rising-tide.git] / Makefile
index eb5bca9f74bbf8c3aa74b70306de771ef2ca193d..97f112b4b8c828e7c62b8ecc535f34fca77096be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,10 +92,15 @@ BOARDFILES=                                         \
        $(addprefix layout-test-,       b m t a1m)
 
 
-all:           all-ps all-pdf
+all:           all-ps all-pdf all-preview
 
-all-ps:        $(addsuffix .ps,  $(BOARDFILES))
-all-pdf:       $(addsuffix .pdf, $(BOARDFILES))
+PSS=$(addsuffix .ps,  $(BOARDFILES))
+PDFS=$(addsuffix .pdf, $(BOARDFILES))
+PREVIEWS=maxprintable-a3-preview.png
+
+all-ps:        $(PSS)
+all-pdf:       $(PDFS)
+all-preview:   $(PREVIEWS)
 
 %.pdf: %.ps Makefile
        $(PS2PDF) $(PS2PDF_FLAGS) $< $@.tmp && $i
@@ -105,6 +110,15 @@ cmyk.pdf: PS2PDF_FLAGS += -dAutoRotatePages=/None
 map.plag: generate-plag input-graph Parse.pm 
        ./$< input-graph $o
 
+www=ianmdlvl@chiark:public-html/pandemic-rising-tide
+
+html: $(PDFS) $(PREVIEWS) README map.plag
+       rm -rf $@ $@.tmp; mkdir $@.tmp
+       cp $^ $@.tmp/ && $i
+
+to-www: html
+       rsync -aH --delete html/. $(www)/.
+
 # create opt.plag.reuse to shortcut this
 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
        ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
@@ -127,6 +141,9 @@ maxprintable-%.ps: $(BOARDDEPS)
 minprintable-%.ps: $(BOARDDEPS)
        ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
 
+%-preview.png: %.pdf Makefile
+       gm convert -geometry 50% $< png:$@.tmp && $i
+
 boundings-%.ps: $(BOARDDEPS)
        ./generate-board -XB$* faces.plag input-graph $o