made run targets work a bit better, which will hopefully fix attack of stupidity...
authorChris Koeritz <fred@gruntose.com>
Thu, 19 Apr 2012 01:41:43 +0000 (21:41 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 19 Apr 2012 01:41:43 +0000 (21:41 -0400)
server is having when running the crypto tests, occasionally.

doc/headers/fmc_header.java
doc/headers/shell_header.txt
doc/headers/uva_header.java
scripts/clam/rules.def
scripts/clam/target_runner.sh [new file with mode: 0644]

index 0c6a5f9a9b7ce683178923870b3753cb7107a6d6..bc60f6ad3be8e207211cef076454ff85aae8475e 100644 (file)
@@ -1,6 +1,7 @@
 
 /**
- * {summary of class}
+ * {one-line description}
+ * {extended information...}
  * @author Chris Koeritz
  * @copyright Copyright (c) 2012-$now By Feisty Meow Concerns, Ltd.
  * @license This file is free software; you can modify/redistribute it under the terms of the GNU
index daa9da9996f5ba157306446f368db1d0b9319b4d..1f2dd32e79cf071903c9bc1d8d0ebc6c4c0194f7 100644 (file)
@@ -10,4 +10,5 @@
 # of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
 # Feel free to send updates to: [ fred@gruntose.com ]
 ##############
-
+#
+# ...description of file.
index 8acd50739f8e431264a96f7d6af879c4cf72e2f0..55985ee938a51668f55d139282586e2f41bf54d6 100644 (file)
@@ -1,6 +1,7 @@
 
 /**
- * {summary of class}
+ * {one-line description}
+ * {extended information...}
  * @author Chris Koeritz
  * @copyright Copyright (c) 2012-$now By University of Virginia
  * @license This file is free software; you can modify and redistribute it under the terms of the
index 1a526236253122c9d80f33b3f223f8123fc9be1d..4706079f347e0ce73173afacff32229332bb347b 100644 (file)
@@ -51,12 +51,12 @@ else \
   echo Skipping missing directory [$*]; \
 fi'
 
-# always run the targets.  if they don't exist, that's an error.
+# always run the exes listed in RUN_TARGETS.
 .PHONY: run_targets
 
 # "all" is the first target to execute in any makefile.  we capture it and
 # use it to produce the requested actions.
-all: start $(ACTUAL_FIRST_TARGETS) $(ACTUAL_TARGETS) $(ACTUAL_LAST_TARGETS) $(RUN_TARGETS:%=run_targets) finish 
+all: start $(ACTUAL_FIRST_TARGETS) $(ACTUAL_TARGETS) $(ACTUAL_LAST_TARGETS) run_targets finish 
 
 # "start" announces the beginning of compilation.
 start:
@@ -87,26 +87,8 @@ endif
 
 # runs the programs specified in the RUN_TARGETS variable.
 run_targets:
-       $(HIDESH) -c '\
-if [ ! -z "$(RUN_TARGETS)" ]; then \
-  if [ -f "$(DIRTY_FILE)" -o -f "$(SUBMAKE_FLAG)" ]; then \
-    total_exitval=0; \
-    for program_name in $(RUN_TARGETS); do \
-      base=`basename $$program_name`; \
-      "$$program_name"; \
-      exitval=$$?; \
-      if [ $$exitval -ne 0 ]; then \
-        echo -e "ERROR: $$program_name at `date`"; \
-        total_exitval=$$(($$total_exitval + 1)); \
-      fi; \
-    done; \
-    if [ $$total_exitval -ne 0 ]; then \
-      echo "FAILURE: errors occurred in RUN_TARGETS."; \
-      echo yep >"$(FAILURE_FILE)"; \
-      exit 1; \
-    fi; \
-  fi; \
-fi'
+       $(HIDESH)"$(CLAM_DIR)/target_runner.sh"
+#### "$(RUN_TARGETS)"
 
 # "make_subdirs" travels down each subdirectory and builds using make.
 make_subdirs:
diff --git a/scripts/clam/target_runner.sh b/scripts/clam/target_runner.sh
new file mode 100644 (file)
index 0000000..d915a9a
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+##############
+# Name   : target_runner.sh
+# Author : Chris Koeritz
+# Rights : Copyright (C) 2012-$now by Feisty Meow Concerns, Ltd.
+##############
+# This script is free software; you can modify/redistribute it under the terms
+# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
+# Feel free to send updates to: [ fred@gruntose.com ]
+##############
+#
+# Runs the programs listed in clam's RUN_TARGETS and reports any errors seen.
+
+#echo entering target_runner with variables:
+#echo -e "\tRUN_TARGETS=${RUN_TARGETS}"
+#echo -e "\tDIRTY_FILE=${DIRTY_FILE}"
+#echo -e "\tSUBMAKE_FLAG=${SUBMAKE_FLAG}"
+#echo -e "\tFAILURE_FILE=${FAILURE_FILE}"
+
+if [ ! -z "${RUN_TARGETS}" ]; then
+  if [ -f "${DIRTY_FILE}" -o -f "${SUBMAKE_FLAG}" ]; then
+    total_exitval=0;
+    for program_name in ${RUN_TARGETS}; do
+      base=$(basename $program_name);
+      "$program_name";
+      exitval=$?;
+      if [ $exitval -ne 0 ]; then
+        echo "ERROR: $program_name exits with $exitval at $(date)";
+        total_exitval=$(($total_exitval + 1));
+      fi;
+    done;
+    if [ $total_exitval -ne 0 ]; then
+      echo "FAILURE: $total_exitval errors occurred in RUN_TARGETS.";
+      echo yep >"${FAILURE_FILE}";
+      exit 1;
+    fi;
+  fi;
+fi
+