-o= >$@.tmp && mv -f $@.tmp $@
+i=mv -f $@.tmp $@
+o= >$@.tmp && $i
export PERL_HASH_SEED=1
-map.plag: parse-input-graph input-graph
- ./$^ $o
+PLANAR_GRAPH=planar-graph
+
+map.plag: parse-input-graph input-graph Parse.pm
+ ./$< input-graph $o
+
+opt.plag: map.plag $(PLANAR_GRAPH)
+ sha256sum $^ >.opt.plag.sums.tmp
+ cmp .opt.plag.sums.tmp .opt.plag.sums || ( \
+ $(PLANAR_GRAPH) RF $< \
+ DUAL \
+ OUTER-F2V OUTER-SPLIT \
+ B T OUTER-F2V OUTER-F12VA \
+ PCO CP RAE \
+ D 0 NLOPT \
+ W $@.tmp \
+ && $i \
+ && mv -vf .opt.plag.sums.tmp .opt.plag.sums )
#map.ps: map.dot
# neato -Tps $^ $o