# # ${RHOME}/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = . include $(top_builddir)/Makeconf distdir = $(PACKAGE)-$(VERSION) DISTFILES = COPYING COPYRIGHTS INSTALL MIRROR-SITES NEWS PLATFORMS \ PROJECTS README RESOURCES TASKS \ Makeconf.in Makefile.in \ config.site configure configure.in configure.mac configure.win \ date-stamp SUBDIRS = src afm demos doc etc tests GZIP = --best all: Makefile R docs Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status R: stamp-R stamp-R: $(top_builddir)/src/include/Platform.h \ $(top_srcdir)/src/*/*.[chfy] \ $(top_srcdir)/src/library/*/R/*.R \ $(top_srcdir)/src/library/*/src/*.[chf] @rm -f $@ @for d in afm demos doc etc src; do \ (cd $$d && $(MAKE) R); \ done @if [ ! -f src/library/stamp-docs ]; then \ echo "You should \`make docs' now ..."; \ fi @touch $@ $(top_builddir)/src/include/Platform.h: $(srcdir)/date-stamp $(top_srcdir)/configure --srcdir $(top_srcdir) docs help html latex examples:: FORCE -@(cd src/library && $(MAKE) $@) FORCE: install: all installdirs @for d in afm demos doc etc; do \ (cd $$d && $(MAKE) $@); \ done @(cd $(srcdir); \ for f in COPYING COPYRIGHTS MIRROR-SITES RESOURCES; do \ $(INSTALL_DATA) $$f $(rhome); \ done) @echo "Installing executables ..." @$(INSTALL_PROGRAM) bin/R.binary $(rhome)/bin @cat bin/R | sed "s@RHOME=.*@RHOME=$(rhome)@" > $(rhome)/bin/R @cat bin/R | sed "s@RHOME=.*@RHOME=$(rhome)@" > $(bindir)/R @chmod 755 $(bindir)/R $(rhome)/bin @for f in `ls bin/* | grep -v '^R\|R.binary'`; do \ $(INSTALL) $$f $(rhome)/bin; \ done @for f in Rd2txt Rdconv Rdindex Sd2Rd; do \ $(INSTALL) bin/$$f $(bindir); \ done @echo "Installing headers ..." @for f in include/*.h; do \ $(INSTALL_DATA) $$f $(rhome)/include; \ done @echo "Installing library ..." @cd library; $(TAR) cf - [a-z]* | (cd $(rhome)/library; tar xf -) @echo " Building help index ..." @(cd $(rhome)/library; cat */TITLE > LibIndex 2> /dev/null) @echo " Building HTML index ..." @$(rhome)/bin/build-help --rhome $(rhome) --htmllists installdirs: @$(MKINSTALLDIRS) $(bindir) @$(MKINSTALLDIRS) $(rhome)/bin @$(MKINSTALLDIRS) $(rhome)/include @$(MKINSTALLDIRS) $(rhome)/library install-strip: $(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install uninstall: @echo "Uninstalling library ..." @(cd $(rhome)/library; \ for p in base eda modreg mva stepfun; do rm -rf $$p; done) @echo " Rebuilding help index ..." @(cd $(rhome)/library; cat */TITLE > LibIndex 2> /dev/null) @echo " Rebuilding HTML index ..." @$(rhome)/bin/build-help --rhome $(rhome) --htmllists @echo "Uninstalling headers ..." @rm -rf $(rhome)/include @echo "Uninstalling executables ..." @rm -rf $(rhome)/bin @for f in R Rd2txt Rdconv Rdindex Sd2Rd; do \ rm -f $(bindir)/$$f; \ done @for f in COPYING COPYRIGHTS MIRROR-SITES RESOURCES; do \ rm -f $(rhome)/$$f; \ done @for d in afm demos doc etc; do \ (cd $$d && $(MAKE) $@); \ done mostlyclean: clean clean: @for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@); \ done @rm -f stamp-R distclean: clean @for d in $(SUBDIRS); do \ (cd $${d} && $(MAKE) $@); \ done @rm -rf bin include library @rm -f Makeconf Makefile Makefile.bak Makefrag.* \ config.cache config.log config.status maintainer-clean: distclean dist: dist-unix dist-unix: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP) $(TAR) chzf $(distdir).tar.gz $(distdir) rm -rf $(distdir) dist-win: distdir: $(DISTFILES) @rm -rf $(distdir) @mkdir $(distdir) @-chmod 755 $(distdir) @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 @for d in aux debian; do \ ((cd $(srcdir); $(TAR) -c -f - --exclude=CVS $${d}) \ | (cd $(distdir); $(TAR) -x -f -)) \ || exit 1; \ done dvi: -@(cd doc && $(MAKE) $@) info: TAGS: check test:: test-All test-All test-Examples:: -@(cd tests && $(MAKE) $@)