The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14114 ripley 1
# -*- Makefile -*-
2
#
17845 ripley 3
# ${R_HOME}/share/make/wintests.mk
14114 ripley 4
 
5
makevars =
6
srcdir = .
7
 
8
test-src = $(test-src-1) $(test-src-auto)
9
test-out = $(test-src:.R=.Rout)
10
 
11
R = srcdir=$(srcdir) $(R_HOME)/bin/Rterm.exe --vanilla
12
RDIFF = $(R_HOME)/bin/Rcmd Rdiff.sh
14277 ripley 13
USE_GCT = 0
14114 ripley 14
 
15
.SUFFIXES:
16
.SUFFIXES: .R .Rin .Rout
17
 
18
.Rin.R:
20309 ripley 19
	@echo "Creating '$@'"
14114 ripley 20
	@$(R) < $< > /dev/null
21
 
22
.R.Rout:
23
	@rm -f $@ $@.fail
20309 ripley 24
	@echo "  Running '$<'"
25
	@(if test "$(USE_GCT)" != 0; then echo "gctorture(TRUE)"; fi; \
23262 ripley 26
	  cat $<) | $(R) R_LIBS="$(R_LIBS)" > $@ 2>&1
14114 ripley 27
	@if test -f $(srcdir)/$@.save; then \
28
	  mv $@ $@.fail; \
23262 ripley 29
	  echo -n "  Comparing '$@' to '$@.save' ..."; \
14114 ripley 30
	  $(RDIFF) $@.fail $(srcdir)/$@.save 0 || exit 1; \
31
	  mv $@.fail $@; \
23262 ripley 32
	  echo "OK"; \
14114 ripley 33
	fi
34
 
35
all:
36
	@(out=`echo "$(test-out)" | sed 's/ $$//g'`; \
37
	  if test -n "$${out}"; then \
18907 ripley 38
	    $(MAKE) -f $(R_HOME)/share/make/wintests.mk $(makevars) $${out}; \
14114 ripley 39
	  fi)
40
 
41
clean:
42
	@rm -f $(test-out) $(test-src-auto) *.fail