i=mv -f $@.tmp $@ o= >$@.tmp && $i export PERL_HASH_SEED=1 # PLAG_DEBUG ?= $(PLAG) # effectively # PLAG_RELEASE ?= $(PLAG) # ie caller may set these PLAG_DIR ?= ../plag-mangler 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 # plag-mangler 3a1eae4d6395f7d862cf66d0e4a1008d1bedc6e7 # rc-dlist-deque 3e19e16dde436fc1ac03534bf502588d17b3faeb # c_vec 3394762a6221c44f8e22b222ce5547f6534129ea # rust-nlopt d6781621e72bb7a78da56689ab5bb27befafec6a # nlopt (hack) 3068d8b694a6047c4f374b7267a54fdb3fae1f69 2.3+252-g8b3cb5a-1 # crates from Debian buster: # libc 0.2.43-1 # arrayvec 0.4.8-1 # also relevant # libboost-dev:amd64 1.67.0.1 # libboost1.67-dev:amd64 1.67.0-11 PS2PDF ?= ps2pdf PS2PDF_FLAGS ?= export PERL_HASH_SEED=1 export PERL_PERTURB_KEYS=0 default: all # board-pMAXPAPER-bPAGE.pdf # 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 pa1m pa1m-bPageP ) \ $(addprefix board-, pa3-bPageB pa3-bPageMT \ pa4-bPageB pa4-bPageM pa4-bPageT \ pa1-bPageP pa1m-bPageP ) \ $(addprefix a4-test-, b m t a1m) \ layout-test-preview \ $(addprefix layout-test-, b m t a1m) all: all-ps all-pdf all-ps: $(addsuffix .ps, $(BOARDFILES)) all-pdf: $(addsuffix .pdf, $(BOARDFILES)) %.pdf: %.ps Makefile $(PS2PDF) $(PS2PDF_FLAGS) $< $@.tmp && $i cmyk.pdf: PS2PDF_FLAGS += -dAutoRotatePages=/None map.plag: generate-plag input-graph Parse.pm ./$< input-graph $o # create opt.plag.reuse to shortcut this opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile ./$(filter-out Makefile, $^) $@ .opt.plag.sums \ R \ DUAL \ OUTER-F2V OUTER-SPLIT \ B T OUTER-F2V OUTER-F12VA \ PCO CP RAE \ D 0 NLOPT \ W $@.tmp faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i BOARDDEPS= generate-board faces.plag input-graph misc-data.pl Parse.pm maxprintable-%.ps: $(BOARDDEPS) ./generate-board -Xp$* faces.plag input-graph $o minprintable-%.ps: $(BOARDDEPS) ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o boundings-%.ps: $(BOARDDEPS) ./generate-board -XB$* faces.plag input-graph $o board-%.ps: $(BOARDDEPS) ./generate-board -X$* faces.plag input-graph $o layout-test-a1m.ps: $(BOARDDEPS) layout-test-prefix-a1.ps ./generate-board -XWB,pa1m-bPageP faces.plag input-graph >$@.tmp.1 cat layout-test-prefix-a1.ps $@.tmp.1 $o a4-test-a1m.ps: $(BOARDDEPS) layout-test-prefix-a1.ps ./generate-board -XB,pa1m-bPageP faces.plag input-graph >$@.tmp.1 cat layout-test-prefix-a1.ps $@.tmp.1 $o layout-test-preview.ps: $(BOARDDEPS) ./generate-board -XW faces.plag input-graph $o layout-test-%.ps: layout-test-prefix-%.ps layout-test-preview.ps cat $^ $o a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps cat $^ $o #map.ps: map.dot # neato -Tps $^ $o