# # ${R_HOME}/src/library/base/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../../.. subdir = src/library/base include $(top_builddir)/Makeconf distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = DESCRIPTION.in Makefile.in makebasedb.R pkg = base RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R $(srcdir)/R/$(R_OSTYPE)/*.R` RdSRC = $(srcdir)/man/*.Rd $(srcdir)/man/$(R_OSTYPE)/*.Rd R_EXE = $(top_builddir)/bin/R --vanilla all: Makefile DESCRIPTION @echo "building package '$(pkg)'" @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/R @(f=$${TMPDIR:-/tmp}/R$$$$; \ cat $(RSRC) >> $${f}; \ $(SHELL) $(top_srcdir)/tools/move-if-change $${f} all.R) @$(SHELL) $(top_srcdir)/tools/copy-if-change all.R \ $(top_builddir)/library/$(pkg)/R/$(pkg) $${f} @for f in COPYRIGHTS INDEX SOURCES; do \ if test -f $(srcdir)/$${f}; then \ $(INSTALL_DATA) $(srcdir)/$${f} \ $(top_builddir)/library/$(pkg); \ fi; \ done @if test -f DESCRIPTION; then \ $(INSTALL_DATA) DESCRIPTION $(top_builddir)/library/$(pkg); \ (tmp="Built: R $(VERSION); "; \ if test -d $(srcdir)/src; then \ tmp="$${tmp}$(R_PLATFORM)"; \ fi; \ tmp="$${tmp}; `date`; $(R_OSTYPE)"; \ echo "$${tmp}") \ >> $(top_builddir)/library/$(pkg)/DESCRIPTION; \ fi @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/data @for f in `ls -d $(srcdir)/data/* | sed '/CVS/d'`; do \ $(INSTALL_DATA) $${f} $(top_builddir)/library/$(pkg)/data; \ done @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/demo @for f in `ls -d $(srcdir)/demo/* | sed '/CVS/d'`; do \ $(INSTALL_DATA) $${f} $(top_builddir)/library/$(pkg)/demo; \ done @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/man @(f=$${TMPDIR:-/tmp}/R$$$$; \ for rdfile in $(RdSRC); do \ echo "% --- Source file: $${rdfile} ---"; \ cat $${rdfile}; echo '\eof'; \ done >> $${f}; \ $(SHELL) $(top_srcdir)/tools/move-if-change $${f} \ $(top_builddir)/library/$(pkg)/man/$(pkg).Rd) @$(INSTALL_DATA) $(srcdir)/inst/CITATION $(top_builddir)/library/$(pkg) @USE_LAZY_LOAD_TRUE@ @$(MAKE) RfilesLazy Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ DESCRIPTION: $(srcdir)/DESCRIPTION.in $(top_builddir)/config.status @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ RfilesLazy: @$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg) @(cat $(srcdir)/../tools/R/makeLazyLoad.R $(srcdir)/makebasedb.R; \ echo "makeLazyLoading(\"$(pkg)\")") | \ R_DEFAULT_PACKAGES=NULL LC_COLLATE=C $(R_EXE) --slave > /dev/null mostlyclean: clean clean: -@rm -f all.R distclean: -@rm -f Makefile DESCRIPTION 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 R data demo exec inst man src; do \ if test -d $(srcdir)/$${d}; then \ ((cd $(srcdir); \ $(TAR) -c -f - $(DISTDIR_TAR_EXCLUDE) $${d}) \ | (cd $(distdir); $(TAR) -x -f -)) \ || exit 1; \ fi; \ done