From Martin Maechler <maechler@stat.math.ethz.ch>  Wed Nov 12 09:48:09 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Wed, 12 Nov 1997 10:48:09 +0100
Subject: R-alpha: batch -- no problem with make and proper Makefile
In-Reply-To: <9711120917.AA21246@alpha.luc.ac.be> (message from Jim Lindsey on
 Wed, 12 Nov 1997 10:17:52 +0100 (MET))
Message-ID: <199711120948.KAA10947@sophie.ethz.ch>

Yes, I use batch too.

In addition, I also use 'make' consistently
My current approach (this is Makefile syntax)
Just
	@-rm -f .RData
	R < input > output	


Actually, I'm a bit smarter and have a Makefile of the form

##--------------------- Makefile for different R batch jobs ----------
##----------------------------- Martin Maechler ----------------------	
R = /usr/local/bin/R
R = /usr/local/bin/R-MM

TESTsrc = str-test.R foobar.R thistest.R  thattest.R
TESTout = $(TESTsrc:.R=.Rout)

%.Rout: %.R
	if [ -f .RData ];   then mv .RData .RData-mm; fi
	if [ -f .Rprofile ];then mv .Rprofile .Rprofile-mm; fi
	touch .Rprofile;
	(echo '##-*- R-transcript -*- --- empty .Rprofile'; $(R) < $< ) > $@
	-@wc $@

all: tests
tests: $(TESTout)

str-test.Rout:: str-src.R

clean: ; mv $(TESTout) out-safe/ ; rm -f $(Shars)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


R-alpha: batch -- no problem with make and proper Makefile
Martin Maechler