Diff of /classic-bugs/vol1/Makefile [b27580] .. [1771d5] Maximize Restore

  Switch to side-by-side view

--- a/classic-bugs/vol1/Makefile
+++ b/classic-bugs/vol1/Makefile
@@ -1,7 +1,7 @@
 JAGS ?= /usr/local/bin/jags
 TIME = /usr/bin/time
 EXAMPLES ?= blocker bones dyes equiv leuk line litters mice pump \
-         rats salm seeds oxford lsat
+	rats salm seeds oxford lsat
 
 all:
 
@@ -13,8 +13,7 @@
 	    for cmdfile in `ls test*.cmd`; do \
 	       echo "Running " $${cmdfile}; \
 	       ($(JAGS) $${cmdfile} && \
-	       R --vanilla --quiet < ../../R/bench.R && \
-	       mv dumpdata.R bench-$${cmdfile%%.cmd}.R;) || exit 1; \
+	       Rscript -e "benchfile='bench-$${cmdfile%%.cmd}.R'; source('../../R/bench.R')";) || exit 1; \
 	    done;) || exit 1;\
 	done;
 
@@ -23,22 +22,20 @@
 	@for d in $(EXAMPLES); do \
 	   (cd $${d} && \
 	    for cmdfile in `ls test*.cmd`; do \
-	      (cp bench-$${cmdfile%%.cmd}.R bench.R &&  \
-	      $(JAGS) $${cmdfile} && \
-	      R --vanilla --quiet < ../../R/check.R && \
-	      rm bench.R;) || exit 1; \
+	      ($(JAGS) $${cmdfile} && \
+	       Rscript -e "source('bench-$${cmdfile%%.cmd}.R'); source('../../R/check.R')";) \
+		|| exit 1; \
 	    done;) || exit 1;\
 	done;
 
 Rcheck: 
 	@echo "Checking output against benchmark results"
 	@for d in $(EXAMPLES); do \
-           (cd $${d} && \
-            for cmdfile in `ls test*.R`; do \
-              R --vanilla  < $${cmdfile} || exit 1; \
-            done;) || exit 1;\
+	   (cd $${d} && \
+	   for cmdfile in `ls test*.R`; do \
+	      R --vanilla  < $${cmdfile} || exit 1; \
+	   done;) || exit 1;\
 	done;
-
 
 checktime:
 	rm -f times
@@ -60,4 +57,3 @@
 	@for d in $(EXAMPLES); do \
 	   (cd $${d} && rm -f bench-*.R) || exit 1; \
 	done;
-