chiark / gitweb /
maybe-rerun-optim
[pandemic-rising-tide.git] / Makefile
index 5ce5779f77f0b23837247fbef2e8d6671410b5d5..d15de38419dee23a3f28e32024153cf30e061279 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,18 +9,16 @@ PLANAR_GRAPH=planar-graph
 map.plag: generate-plag 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 $<                           \
+# create opt.plag.reuse to shortcut this
+opt.plag: maybe-rerun-optim map.plag $(PLANAR_GRAPH)
+       ./$^ $@ .opt.plag.sums \
+               R                                       \
                DUAL                                    \
                OUTER-F2V OUTER-SPLIT                   \
                B T OUTER-F2V OUTER-F12VA               \
                PCO CP RAE                              \
-               D 0 NLOPT                               \
+               D 0 NLOPT                               \
                W $@.tmp                                \
-               && $i                                   \
-               && mv -vf .opt.plag.sums.tmp .opt.plag.sums )
 
 #map.ps: map.dot
 #      neato -Tps $^ $o