The R Project SVN R

Rev

Rev 57532 | Rev 66009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2184 hornik 1
#
4580 hornik 2
# ${R_HOME}/tests/Examples/Makefile
2184 hornik 3
 
4
VPATH = @srcdir@
5
srcdir = @srcdir@
6
top_srcdir = @top_srcdir@
7
 
8
top_builddir = ../..
2331 hornik 9
subdir = tests/Examples
2184 hornik 10
 
11
include $(top_builddir)/Makeconf
12
 
2376 hornik 13
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
51917 ripley 14
INSTFILES = \
51888 ripley 15
  datasets-Ex.Rout.save grDevices-Ex.Rout.save graphics-Ex.Rout.save \
55612 ripley 16
  grid-Ex.Rout.save splines-Ex.Rout.save \
51888 ripley 17
  stats-Ex.Rout.save stats4-Ex.Rout.save tools-Ex.Rout.save
51917 ripley 18
DISTFILES = Makefile.in  Makefile.win $(INSTFILES)
2376 hornik 19
 
60254 ripley 20
## R_LIBS_SITE has to be non-empty or it is ignored
21
R_EXE = LANGUAGE=en LC_TIME=C R_LIBS= R_LIBS_USER= R_LIBS_SITE='nothing' \
22
  $(top_builddir)/bin/R --slave --vanilla
47627 ripley 23
 
47810 ripley 24
all: Makefile test-Examples-Base
2184 hornik 25
 
2331 hornik 26
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
17899 hornik 27
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
47795 ripley 28
 
21302 hornik 29
test-Examples: test-Examples-Base
47795 ripley 30
 
31
## Who does make check but not make? -- maybe better to check what was made.
21302 hornik 32
test-Examples-Base: Makefile
51723 ripley 33
	@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples', srcdir=\"$(srcdir)\")" | $(R_EXE)
6098 pd 34
 
47795 ripley 35
 
21712 hornik 36
## <NOTE>
37
## We do *not* want this to be added to test-Examples conditional on
23229 hornik 38
## @USE_RECOMMENDED_PACKAGES_TRUE@.
23861 hornik 39
## 'make check-all' is used for running test-Examples-Recommended in
21712 hornik 40
## addition to 'make check'.
53331 ripley 41
## nlme suggests 'Hmisc'
21302 hornik 42
test-Examples-Recommended: test-Examples-Base
57532 ripley 43
	@$(ECHO) "tools::testInstalledPackages(scope='recommended', types='examples')" | _R_CHECK_FORCE_SUGGESTS_=FALSE $(R_EXE)
21712 hornik 44
## </NOTE>
21242 pd 45
 
2184 hornik 46
mostlyclean: clean
47
clean:
57251 ripley 48
	-@rm -f *.R *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz Makedeps
2184 hornik 49
distclean: clean
47759 ripley 50
	-@rm -f *.R*prev .RData sink-examp.txt Makefile
2184 hornik 51
maintainer-clean: distclean
2376 hornik 52
 
51917 ripley 53
install-tests:
54
	@$(MKINSTALLDIRS) "$(DESTDIR)$(rhome)/tests/Examples"
55
	@for f in $(INSTFILES); do \
56
	  $(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rhome)/tests/Examples"; \
57
	done
58
 
59
 
2376 hornik 60
distdir: $(DISTFILES)
61
	@for f in $(DISTFILES); do \
62
	  test -f $(distdir)/$${f} \
63
	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
64
	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
7431 hornik 65
	done