Makefile.win 2.54 KB
Newer Older
1 2
#-*- Makefile -*-
#
3 4 5 6 7
# ${R_HOME}/tests/Makefile.win

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

10 11 12 13
# for R_PKGS_BASE
include ../src/gnuwin32/MkRules
include ../share/make/vars.mk

14
srcdir = .
15
top_srcdir = ..
16 17
top_builddir = ..
R_HOME = ..
18
include Makefile.common
19

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
24
RVAL_IF_DIFF=0
25
## suppress fancy quotes for diff-ing
26
RDCONV = LC_ALL=C $(R_HOME)/$(BINDIR)/Rcmd Rdconv
27

28 29 30 31 32 33
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
MK = $(MAKE) -f Makefile.win
TAR = tar
34

35
## override Makefile.common
36
test-src-reg-1e = reg-win.R
37

38 39 40 41
all check test-all-basics test-all-devel: Makefile.win Makefile.common

test-system2.exe: test-system2.c

42
## Not run by any other target
43 44 45
test-System: test-system2.exe
	@$(MK) test-system.Rout

46 47 48 49 50

internet.Rout2:
	-@$(R) --internet2 < internet.R > internet.Rout2 2>&1 || \
	  echo " testing --internet2 failed"

51 52 53
## <NOTE>
## These depend on an internet connection, and the sites being up.
## So allow this to fail: it may be slow doing so.
54
test-Internet:
55
	@$(RM) -f internet.Rout internet.Rout2
56
	@$(ECHO) "running tests of Internet functions"
57 58 59 60 61
	@$(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
62

63 64
test-Standalone:
	@echo "testing building standalone Rmath"
65
	@$(MAKE) -C ../src/nmath/standalone -f Makefile.win check || exit 1
66

67

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

distclean: clean
	@$(MK) -C Examples $@
88
	@rm -rf *.Rcheck RecPackages
89
	-@rm -f *.fail
90 91 92 93 94

install-tests:
	@for f in $(INSTFILES); do \
	  cp $(srcdir)/$${f} "$(INST_TO)"; \
	done
95
	@$(MAKE) -C Examples -f Makefile.win install-tests INST_TO="$(INST_TO)"