Permalink
Browse files

Rewrite.

git-svn-id: https://svn.r-project.org/R/trunk@2202 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
1 parent 7130b3d commit 1f7ea5b8ccf71981d62d150abf3ad4c752f2a4e6 hornik committed Sep 17, 1998
Showing with 47 additions and 61 deletions.
  1. +47 −61 Makefile.in
View
@@ -7,110 +7,96 @@ top_srcdir = @top_srcdir@
top_builddir = .
-base_src = $(top_builddir)/src/*/*.[chf] $(top_builddir)/src/library/*/R/*.R
-
include $(top_builddir)/Makeconf
+base_src = $(top_builddir)/src/*/*.[chf] $(top_builddir)/src/library/*/R/*.R
+
all: R docs
R: stamp-R
stamp-R: $(top_builddir)/src/include/Platform.h $(base_src)
- @echo 'Building R'
- cd src; $(MAKE) R
- @if [ ! -f etc/stamp-docs ]; then\
- echo 'You should'; echo ' make docs'; echo 'now ...';fi
+ @for d in afm etc src; do cd $$d; $(MAKE) $@; cd ..; 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: build-docs
-help: build-help
-html: build-html
-latex: build-latex
-dvi: build-dvi
+docs help html latex dvi:: FORCE
+ -@cd src/library; $(MAKE) $@
-build-docs build-help build-latex build-html build-dvi::
- -@cd etc; MANSRC=`echo ../src/library/*/man/*.Rd` $(MAKE) $@
+FORCE:
install: all installdirs
- $(INSTALL_DATA) R.1 $(mandir)/man1
- $(INSTALL_DATA) Rdconv.1 $(mandir)/man1
+ $(INSTALL_DATA) $(srcdir)/R.1 $(mandir)/man1
+ $(INSTALL_DATA) $(srcdir)/Rdconv.1 $(mandir)/man1
(cd $(mandir)/man1; \
for f in Rd2txt.1 Rdindex.1 Sd2Rd.1; \
do rm -f $$f; $(LN_S) Rdconv.1 $$f; \
done)
- for f in COPYING COPYRIGHTS MIRROR-SITES RESOURCES; \
- do $(INSTALL_DATA) $$f $(rhome); done
+ @(cd $(srcdir); \
+ for f in COPYING COPYRIGHTS MIRROR-SITES RESOURCES; do \
+ $(INSTALL_DATA) $$f $(rhome); \
+ done)
cd afm; $(MAKE) $@
$(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
- for f in `ls bin/* | grep -v 'R\|R.binary'`; \
- do $(INSTALL) $$f $(rhome)/bin; done
+ 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
cd demos; $(MAKE) $@
cd doc; $(MAKE) $@
cd etc; $(MAKE) $@
- for f in include/*.h; \
- do $(INSTALL_DATA) $$f $(rhome)/include; done
+ @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 -)
(cd $(rhome)/library; cat */TITLE > LibIndex 2> /dev/null)
- $(rhome)/etc/build-help --rhome $(rhome) --htmllists
+ $(rhome)/bin/build-help --rhome $(rhome) --htmllists
installdirs:
- $(top_srcdir)/aux/mkinstalldirs $(bindir) $(mandir) $(mandir)/man1 \
- $(datadir) $(rhome) $(rhome)/bin \
- $(rhome)/etc $(rhome)/include $(rhome)/library
+ @$(MKINSTALLDIRS) $(bindir)
+ @$(MKINSTALLDIRS) $(mandir)/man1
+ @$(MKINSTALLDIRS) $(rhome)/bin
+ @$(MKINSTALLDIRS) $(rhome)/etc
+ @$(MKINSTALLDIRS) $(rhome)/include
+ @$(MKINSTALLDIRS) $(rhome)/library
install-strip:
$(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install
uninstall:
-mostlyclean:
-
+mostlyclean: clean
clean:
- @echo "Cleaning at top level"; rm -f stamp-R
- @cd demos/dynload; $(MAKE) $@
- @echo "Cleaning ./etc/"; cd etc; $(MAKE) $@
- @echo "Cleaning the source tree"; cd src; $(MAKE) $@
-
-acclean:
- @echo "Cleaning configure files"
- @rm -f config.cache config.log config.status \
- Makeconf Makefile Makefrag.f77
-
-moreclean: clean acclean
- @echo "Cleaning ./etc/ a bit more"; cd etc; $(MAKE) $@
-
-distclean: realclean
-
-realclean:
- @echo "Cleaning at top level (+ bin/, library/, cmd/, doc/)"
- @-rm -f bin/R*
- @-rm -rf `echo library/* | sed 's@library/CVS *@@'`
- @-rm -f Makefrag.f77
- @-rm -f cmd/fwf2table
- @-rm -f doc/keyword-test
- @-rm -f doc/manual/lib2tex
- @-rm -f doc/manual/pkg-*
- @-rm -f doc/html/packages* doc/html/function*
- @cd tests; $(MAKE) $@
- @cd demos/dynload; if [ -f Makefile ] ; then $(MAKE) $@ ; fi
- @echo "Really cleaning ./etc/"; cd etc; $(MAKE) $@
- @echo "Really cleaning the source tree"; cd src; $(MAKE) $@
- $(MAKE) acclean
-
-maintainer-clean:
+ @for d in afm etc src; do \
+ cd $$d; $(MAKE) $@; cd ..; \
+ done
+ @rm -f stamp-R
+distclean: clean
+ @for d in afm demos doc etc src; do \
+ cd $$d; $(MAKE) $@; cd ..; \
+ done
+ @rm -rf bin/* include/* library/*
+ @rm -f Makeconf Makefile Makefile.bak Makefrag.f77 \
+ config.cache config.log config.status
+maintainer-clean: distclean
dist:
info:
TAGS:
-check: test-Examples
+check test:: test-Examples
test-All test-Examples::
-@cd tests; $(MAKE) $@

0 comments on commit 1f7ea5b

Please sign in to comment.