chiark / gitweb /
wip prep paper sizes
[pandemic-rising-tide.git] / Makefile
1
2 i=mv -f $@.tmp $@
3 o= >$@.tmp && $i
4
5 export PERL_HASH_SEED=1
6
7 # PLAG_DEBUG   ?= $(PLAG)     # effectively
8 # PLAG_RELEASE ?= $(PLAG)     # ie caller may set these
9 PLAG_DIR     ?= ../plag-mangle
10
11 USE_PLAG_DEBUG   := $(shell ./find-plag \
12  debug:release "$(PLAG_DIR)" "$(PLAG_DEBUG)" "$(PLAG_RELEASE)" "$(PLAG)")
13 USE_PLAG_RELEASE := $(shell ./find-plag \
14  release:debug "$(PLAG_DIR)" "$(PLAG_RELEASE)" "$(PLAG_DEBUG)" "$(PLAG)")
15
16 # works with plag-mangle 16446a44d3f1f467765879492fa85a01222f8052
17
18 export PERL_HASH_SEED=1
19 export PERL_PERTURB_KEYS=0
20
21 default: all
22
23 BOARDFILES=                                             \
24         $(addprefix maxprintable-,      a3)             \
25         $(addprefix minprintable-,      a3)             \
26         $(addprefix board-,             b mt)           \
27         layout-test                                     \
28         $(addprefix a4-test-,           b m t)          \
29         $(addprefix layout-test-,       b m t)
30
31
32 all: $(addsuffix .ps, $(BOARDFILES))
33
34 cmyk.pdf: cmyk.ps Makefile
35         ps2pdf -dAutoRotatePages=/None cmyk.ps $@.tmp && $i
36
37 map.plag: generate-plag input-graph Parse.pm 
38         ./$< input-graph $o
39
40 # create opt.plag.reuse to shortcut this
41 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
42         ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
43                 R                                       \
44                 DUAL                                    \
45                 OUTER-F2V OUTER-SPLIT                   \
46                 B T OUTER-F2V OUTER-F12VA               \
47                 PCO CP RAE                              \
48                 D 0 NLOPT                               \
49                 W $@.tmp
50
51 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
52         $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
53
54 maxprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
55         ./generate-board -Xp$* faces.plag input-graph $o
56
57 minprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
58         ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
59
60 boundings-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
61         ./generate-board -XBp$* faces.plag input-graph $o
62
63 board-b.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
64         ./generate-board -Xpa3,bPageB faces.plag input-graph $o
65
66 board-mt.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
67         ./generate-board -Xpa3,bPageMT faces.plag input-graph $o
68
69 layout-test.ps: maxprintable.ps Makefile Parse.pm
70         ./generate-board -XW faces.plag input-graph $o
71
72 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
73         cat $^ $o
74
75 a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps
76         cat $^ $o
77
78 #map.ps: map.dot
79 #       neato -Tps $^ $o