# # ${R_HOME}/tests/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. subdir = tests include $(top_builddir)/Makeconf SUBDIRS = Examples R = LC_ALL=C $(top_builddir)/bin/R --vanilla TESTsrc = \ arith-true.R \ arith.R \ d-p-q-r-tests.R \ eval-etc.R \ is-things.R \ primitive-funs.R \ print-tests.R \ simple-tests.R \ simple-true.R TESTout = $(TESTsrc:.R=.Rout) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = Makefile.in README Rdiff \ mode-methods.R \ $(TESTsrc) \ $(TESTsrc:.R=.Rout.save) .SUFFIXES: .SUFFIXES: .R .Rout .R.Rout: @rm -f $@.fail @(SRCDIR=$(srcdir); export SRCDIR; \ echo "$(R) < $< > $@"; \ $(R) < $< > $@) @echo @ECHO_N@ \ "Comparing \`$@' to \`$(srcdir)/$@.save' ...@ECHO_C@" @$(srcdir)/Rdiff $@ $(srcdir)/$@.save || \ (mv $@ $@.fail && exit 1) @echo "@ECHO_T@ OK" all: Makefile test-All Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @cd $(top_builddir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ $(SHELL) ./config.status test-All: Makefile $(MAKE) test-Examples $(MAKE) test-Specific test-Examples: @(cd Examples && $(MAKE) $@) test-Specific: $(TESTout) $(TESTout): Makefile stamp-R stamp-R: $(top_builddir)/bin/R.X11 $(top_builddir)/library/base/R/base @cd $(top_builddir) && $(MAKE) R @touch $@ # FIXME: This should be autogenerated! arith-true.Rout: arith-true.R arith-true.Rout.save arith.Rout: arith.R arith.Rout.save d-p-q-r-tests.Rout: d-p-q-r-tests.R d-p-q-r-tests.Rout.save eval-etc.Rout: eval-etc.R eval-etc.Rout.save is-things.Rout: is-things.R is-things.Rout.save primitive-funs.Rout: primitive-funs.R primitive-funs.Rout.save print-tests.Rout: print-tests.R print-tests.Rout.save simple-tests.Rout: simple-tests.R simple-tests.Rout.save simple-true.Rout: simple-true.R simple-true.Rout.save mostlyclean: clean clean: -(cd Examples; $(MAKE) $@) rm -f stamp-R distclean: clean @rm -f $(TESTout) -(cd Examples; $(MAKE) $@) @rm -f Makefile maintainer-clean: distclean 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 @for d in $(SUBDIRS); do \ test -d $(distdir)/$${d} \ || mkdir $(distdir)/$${d} \ || exit 1; \ chmod 755 $(distdir)/$${d}; \ (cd $${d} && $(MAKE) distdir) \ || exit 1; \ done