# # ${RHOME}/tests/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. subdir = tests include $(top_builddir)/Makeconf distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = $(shell cd $(srcdir); \ ls Makefile.in README Rdiff *.R *.Rout.save) SUBDIRS = Examples ## FIXME RHOME= .. R = LC_ALL=C $(RHOME)/bin/R --vanilla Ex = ./Examples TESTsrc = simple-true.R arith-true.R arith.R d-p-q-r-tests.R \ print-tests.R is-things.R primitive-funs.R eval-etc.R TESTout = $(TESTsrc:.R=.Rout) %.Rout: %.R stamp-R @rm -f $@.fail @(SRCDIR=$(srcdir); export SRCDIR; \ echo "$(R) < $< > $@"; \ $(R) < $< > $@) @echo -n "Comparing \`$@' to \`$(srcdir)/$@.save' ..." @$(srcdir)/Rdiff $@ $(srcdir)/$@.save || \ (mv $@ $@.fail && exit 1) @echo " OK" test-All: test-Examples $(TESTout) test-Examples: @cd $(Ex) && $(MAKE) $@ stamp-R:: $(top_builddir)/bin/R.binary $(top_builddir)/library/base/R/base @cd $(top_builddir) && $(MAKE) R @touch $@ mostlyclean: clean clean: -(cd $(Ex); $(MAKE) $@) rm -f stamp-R distclean: clean @rm -f $(TESTout) -(cd $(Ex); $(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