Makefile.win 2.65 KB
Newer Older
Radford Neal's avatar
Radford Neal committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#-*- Makefile -*-
#
# ${R_HOME}/tests/Makefile.win

all check: test-all-basics
check-devel: check test-all-devel
check-all: check-devel test-Packages-Recommended
check-recommended: test-Packages-Recommended

# for R_PKGS_BASE
include ../src/gnuwin32/MkRules
include ../share/make/vars.mk

srcdir = .
top_srcdir = ..
Radford Neal's avatar
Radford Neal committed
16 17
top_builddir = ..
R_HOME = ..
Radford Neal's avatar
Radford Neal committed
18 19
include Makefile.common

Radford Neal's avatar
Radford Neal committed
20 21 22 23
R = $(R_HOME)/$(BINDIR)/Rterm --vanilla LC_ALL=C SRCDIR=. R_DEFAULT_PACKAGES=
R2 = $(R_HOME)/$(BINDIR)/Rterm --vanilla SRCDIR=. R_DEFAULT_PACKAGES=
R3 = $(R_HOME)/$(BINDIR)/Rcmd check
RDIFF = $(R_HOME)/$(BINDIR)/R CMD Rdiff
Radford Neal's avatar
Radford Neal committed
24 25
RVAL_IF_DIFF=0
## suppress fancy quotes for diff-ing
Radford Neal's avatar
Radford Neal committed
26
RDCONV = LC_ALL=C $(R_HOME)/$(BINDIR)/Rcmd Rdconv
Radford Neal's avatar
Radford Neal committed
27 28 29 30 31 32 33 34

ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
MK = $(MAKE) -f Makefile.win
TAR = tar

Radford Neal's avatar
Radford Neal committed
35
test-src-reg-1e = reg-win.R
Radford Neal's avatar
Radford Neal committed
36 37 38 39 40

all-basic-tests = Examples Specific Reg Internet
all-devel-tests = Docs IsAs Random Demo Primitive Regexp Segfault \
   Standalone Packages

Radford Neal's avatar
Radford Neal committed
41 42 43 44 45 46 47 48
all check test-all-basics test-all-devel: Makefile.win Makefile.common

test-system2.exe: test-system2.c

test-System: test-system2.exe
	@$(MK) test-system.Rout


Radford Neal's avatar
Radford Neal committed
49 50 51 52 53 54 55 56 57
internet.Rout2:
	-@$(R) --internet2 < internet.R > internet.Rout2 2>&1 || \
	  echo " testing --internet2 failed"

## <NOTE>
## These depend on an internet connection, and the sites being up.
## So allow this to fail: it may be slow doing so.
test-Internet:
	@$(RM) -f internet.Rout internet.Rout2
Radford Neal's avatar
Radford Neal committed
58
	@$(ECHO) "running tests of Internet and socket functions"
Radford Neal's avatar
Radford Neal committed
59 60 61 62 63 64 65 66 67 68 69 70 71
	@$(ECHO) "  expect some differences"
	-@$(MK) $(test-out-internet) RVAL_IF_DIFF=0 || \
	  $(ECHO) " testing standard internet connectivity failed"
	@$(MK) internet.Rout2 RVAL_IF_DIFF=0
	-@diff internet.Rout internet.Rout2

test-Standalone:
	@echo "testing building standalone Rmath"
	@$(MAKE) -C ../src/nmath/standalone -f Makefile.win all test || exit 1
	@$(MAKE) -C ../src/nmath/standalone -f Makefile.win clean


clean:
Radford Neal's avatar
Radford Neal committed
72 73
	@rm -f *.Rout *.Rout.fail internet.Rout2 \
	  Rplot* Rprof.out Rprofmem.out \
Radford Neal's avatar
Radford Neal committed
74
	  reg-examples-*.pdf  testCID.* \
Radford Neal's avatar
Radford Neal committed
75 76
	  reg-plot-latin1.ps reg-plot.ps \
	  reg-plot-latin1.pdf reg-plot.pdf reg-tests-*.pdf \
Radford Neal's avatar
Radford Neal committed
77 78 79
	  R-exts.* R-intro.R 
	@rm -f R-exts_res.rc Makedeps
	@rm -f FALSE* PACKAGES* .R .tex mirrors.html ./-package.Rd ex.gz
Radford Neal's avatar
Radford Neal committed
80
	@rm -f testit.txt testit.html testit.tex testit-Ex.R
Radford Neal's avatar
Radford Neal committed
81 82
	@rm -f ver20.txt ver20.html ver20.tex ver20-Ex.R
	@rm -rf anRpackage myTst* myLib
83
	@rm -f *.tar.gz *.Rd
Radford Neal's avatar
Radford Neal committed
84 85 86
	@rm -f keepsource.tex test-system2.exe test-system.Rout
	@$(MK) -C Examples $@
	@$(MK) -C Embedding $@
Radford Neal's avatar
Radford Neal committed
87 88 89

distclean: clean
	@$(MK) -C Examples $@
Radford Neal's avatar
Radford Neal committed
90
	@rm -rf *.Rcheck Packages
Radford Neal's avatar
Radford Neal committed
91 92 93 94 95 96


install-tests:
	@for f in $(INSTFILES); do \
	  cp $(srcdir)/$${f} "$(INST_TO)"; \
	done
Radford Neal's avatar
Radford Neal committed
97
	@$(MAKE) -C Examples -f Makefile.win install-tests INST_TO="$(INST_TO)"