Cache running examples with .have_run flag file. Add results as make target to show...
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 20:17:33 +0000 (13:17 -0700)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 20:17:33 +0000 (13:17 -0700)
examples/.gitignore
examples/.more_run_scripts [deleted file]
examples/Makefile
examples/run_all

index 4366f41d37e0c95c9ce4e354567a8d50c552ec6a..58e9c649e20f36d78599fde53d5432a390854acb 100644 (file)
@@ -14,3 +14,4 @@ b9/fomfil.1
 b9/testem.1
 b11/RPRTsuperiorization
 b11/RPRTklds
+.have_run
diff --git a/examples/.more_run_scripts b/examples/.more_run_scripts
deleted file mode 100644 (file)
index 261455e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-#now need to modify run scripts in examples directory
-for i in `seq 1 10`;
-  do
-    more b$i/run    
-done
index cd5793b1ec1ea597242ee2337b22690c14d4743b..a1bfcdeace73c48f5c3df91e47360d5f808ae045 100644 (file)
@@ -1,15 +1,22 @@
 .PHONY: all run_all regression
 
 all:
-       @echo "Use run_all or regression"
+       @echo "Useful targets: run_all, regression, results"
 
-run_all:
-       ./run_all
+run_all: .have_run
 
-regression:
-       ./regression
+.have_run:
+       @./run_all
+       @touch .have_run
+
+regression: .have_run
+       @./regression
+
+results: .have_run
+       @less */b[0-9].out */b[0-9][0-9].out
 
 clean:
        @rm -f */b[0-9][0-9].out */b1[0-9].out */file11 */prjfil */recfil */eval */src/.o */punch b*/src/*.o */MAPUser1  */snark.lock b*/bin/*
        @rm -f b11/RPRTsuperiorization b11/RPRTklds b9/snark_e.in b9/snark_e.out b9/testem.1 b9/fomfil.1
+       @rm -f .have_run
 
index 713c9a76f463d3410eae2e1d0c12e41d636f50b6..e4ed0e45c39fdf828352433f7e3260587c1aefe7 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
-#now need to modify run scripts in examples directory
-echo "Running all ten examples. This may take a few minutes."
-for i in 1 3 4 5 6 7 8 10 11;
+
+echo "Running all examples. This may take a few minutes."
+for i in 1 3 4 5 6 7 8 10 11 20;
   do
     cd b$i
-    snark14 b"$i".in > b"$i".out
+    snark14 b${i}.in > b${i}.out
     cd .. 
 done