# # ${R_HOME}/src/library/tcltk/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../../.. subdir = src/library/tcltk include $(top_builddir)/Makeconf distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = DESCRIPTION.in Makefile.in NAMESPACE pkg = tcltk R_EXE = $(top_builddir)/bin/R --vanilla RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R $(srcdir)/R/$(R_OSTYPE)/*.R` all: Makefile DESCRIPTION @echo "building package '$(pkg)'" @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/R @(f=$${TMPDIR:-/tmp}/R$$$$; \ if test @use_tcltk@ = yes; then \ cat $(RSRC) > $${f}; \ $(SHELL) $(top_srcdir)/tools/move-if-change $${f} all.R ; \ else \ $(SHELL) $(top_srcdir)/tools/copy-if-change \ $(srcdir)/R/unix/zzz.Rstub \ $(top_builddir)/library/$(pkg)/R/$(pkg) ; \ fi) @if test @use_tcltk@ = yes; then \ $(INSTALL_DATA) $(srcdir)/NAMESPACE \ $(top_builddir)/library/$(pkg); \ rm -f $(top_builddir)/library/$(pkg)/Meta/nsInfo.rds; \ fi; @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 \ echo "tools:::.install_package_description('.', '"$(top_builddir)/library/${pkg}"')" | \ R_DEFAULT_PACKAGES=NULL $(R_EXE) --slave > /dev/null ; \ fi @if test -d $(srcdir)/demo; then \ $(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/demo; \ for f in `ls -d $(srcdir)/demo/* | sed -e '/CVS/d' -e '/00Index/d'`; do \ $(INSTALL_DATA) $${f} $(top_builddir)/library/$(pkg)/demo; \ done; \ fi @if test -d $(srcdir)/exec; then \ $(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/exec; \ for f in `ls -d $(srcdir)/exec/* | sed '/CVS/d'`; do \ $(INSTALL_DATA) $${f} $(top_builddir)/library/$(pkg)/exec; \ done; \ fi @if test -d $(srcdir)/inst/po; then \ $(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/po; \ cp -pr $(srcdir)/inst/po/* $(top_builddir)/library/$(pkg)/po; \ find "$(top_builddir)/library/$(pkg)/po" -name .svn -type d -prune \ -exec rm -rf \{\} \; 2>/dev/null; \ fi @if test -d $(srcdir)/man; then \ $(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/man; \ (f=$${TMPDIR:-/tmp}/R$$$$; \ for rdfile in $(srcdir)/man/*.Rd; 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); \ rm -f $(top_builddir)/library/$(pkg)/man/$(pkg).Rd.gz; \ $(R_GZIPCMD) $(top_builddir)/library/$(pkg)/man/$(pkg).Rd; \ fi @if test -d src -a @use_tcltk@ = yes; then \ (cd src && $(MAKE)) || exit 1; \ fi @if test @use_tcltk@ = yes; then \ $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg) ; \ echo "tools:::makeLazyLoading(\"$(pkg)\")" | \ R_DEFAULT_PACKAGES=NULL LC_COLLATE=C $(R_EXE) --slave > /dev/null ; \ fi 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)/$@ mostlyclean: clean clean: @if test -d src; then (cd src && $(MAKE) $@); fi -@rm -f all.R distclean: @if test -d src; then (cd src && $(MAKE) $@); fi -@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 po 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