chiark / gitweb /
wip pages
[pandemic-rising-tide.git] / Makefile
index ee8052ab7e58e454d59349bff316473a232c379d..49aa74a57ef83bac0d2c442496b188c966ef7018 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,20 +6,46 @@ export PERL_HASH_SEED=1
 
 # PLAG_DEBUG   ?= $(PLAG)     # effectively
 # PLAG_RELEASE ?= $(PLAG)     # ie caller may set these
-PLAG_DIR     ?= ../planar-graph
+PLAG_DIR     ?= ../plag-mangle
 
 USE_PLAG_DEBUG   := $(shell ./find-plag \
  debug:release "$(PLAG_DIR)" "$(PLAG_DEBUG)" "$(PLAG_RELEASE)" "$(PLAG)")
 USE_PLAG_RELEASE := $(shell ./find-plag \
  release:debug "$(PLAG_DIR)" "$(PLAG_RELEASE)" "$(PLAG_DEBUG)" "$(PLAG)")
 
-# with planar-graph 74bbc2b1da372d3456c00bcb07f3358c739e5721
+# works with plag-mangle 16446a44d3f1f467765879492fa85a01222f8052
+
+export PERL_HASH_SEED=1
+export PERL_PERTURB_KEYS=0
 
 default: all
 
-all: whole.ps layout-test.ps \
-       $(addprefix a4-test-,$(addsuffix .ps, b m t)) \
-       $(addprefix layout-test-,$(addsuffix .ps, b m t))
+# board-pMAXPAPER-bPAGE.ps
+#   where MAXPAPER is a3 for one a4 and one a3 page, PAGEs are B, MT
+#                     a4 for three a4 pages, PAGEs are B, M, T
+#                     a1 for one a1 page (with much whitespace), page is P
+#                     a1m like a1 but assumes pasting onto 4 x a4 boards
+#
+# boundings-* (one per MAXPAPER) shows various regions
+#   assuming 5.5mm unprintable border, see $max_printeredge
+
+BOARDFILES=                                            \
+       $(addprefix maxprintable-,      a3)             \
+       $(addprefix minprintable-,      a3)             \
+       $(addprefix boundings-, pa3 pa4 pa1-bPageP                      ) \
+       $(addprefix board-,     pa3-bPageB pa3-bPageMT                  \
+                               pa4-bPageB pa4-bPageM pa4-bPageT        \
+                               pa1-bPageP                              ) \
+       $(addprefix board-,             b mt)           \
+       layout-test                                     \
+       $(addprefix a4-test-,           b m t)          \
+       $(addprefix layout-test-,       b m t)
+
+
+all: $(addsuffix .ps, $(BOARDFILES))
+
+cmyk.pdf: cmyk.ps Makefile
+       ps2pdf -dAutoRotatePages=/None cmyk.ps $@.tmp && $i
 
 map.plag: generate-plag input-graph Parse.pm 
        ./$< input-graph $o
@@ -38,16 +64,25 @@ opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
        $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
 
-whole.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
-       ./generate-board -XS faces.plag input-graph $o
+maxprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
+       ./generate-board -Xp$* faces.plag input-graph $o
+
+minprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
+       ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
+
+boundings-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
+       ./generate-board -XB$* faces.plag input-graph $o
+
+board-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
+       ./generate-board -X$* faces.plag input-graph $o
 
-layout-test.ps: whole.ps Makefile Parse.pm
+layout-test.ps: maxprintable-a3.ps Makefile Parse.pm
        ./generate-board -XW faces.plag input-graph $o
 
 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
        cat $^ $o
 
-a4-test-%.ps: layout-test-prefix-%.ps whole.ps
+a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps
        cat $^ $o
 
 #map.ps: map.dot