1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#
# ${R_HOME}/tests/Examples/Makefile
VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
subdir = tests/Examples
include $(top_builddir)/Makeconf
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
INSTFILES = \
datasets-Ex.Rout.save grDevices-Ex.Rout.save graphics-Ex.Rout.save \
grid-Ex.Rout.save splines-Ex.Rout.save \
stats-Ex.Rout.save stats4-Ex.Rout.save tools-Ex.Rout.save
DISTFILES = Makefile.in Makefile.win $(INSTFILES)
## R_LIBS_SITE has to be non-empty or it is ignored
## Note that this does not set LC_COLLATE. The collation of examples
## is done in C order in massageExamples(), but we want to test the
## orderings users use.
R_EXE = LANGUAGE=en LC_TIME=C R_LIBS= R_LIBS_USER=NULL R_LIBS_SITE=NULL \
$(top_builddir)/bin/R --vanilla --no-echo
all: Makefile test-Examples-Base
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test-Examples: test-Examples-Base
TEST_DONTTEST = FALSE
## Who does make check but not make? -- maybe better to check what was made.
test-Examples-Base: Makefile
@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples', srcdir=if(!$(TEST_DONTTEST)) \"$(srcdir)\", commentDonttest=!$(TEST_DONTTEST))" | $(R_EXE)
## <NOTE>
## We do *not* want this to be added to test-Examples conditional on
## @USE_RECOMMENDED_PACKAGES_TRUE@.
## 'make check-all' is used for running test-Packages-Recommended in
## addition to 'make check', which includes checking the examples.
test-Examples-Recommended: test-Examples-Base
@$(ECHO) "tools::testInstalledPackages(scope='recommended', types='examples')" | $(R_EXE)
## </NOTE>
mostlyclean: clean
clean:
-@rm -f *.R *.R-cnt *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz Makedeps
distclean: clean
-@rm -f *.R*prev .RData sink-examp.txt Makefile
maintainer-clean: distclean
install-tests:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rhome)/tests/Examples"
@for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rhome)/tests/Examples"; \
done
distdir: $(DISTFILES)
@for f in $(DISTFILES); do \
test -f $(distdir)/$${f} \
|| ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
|| cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
done
|