Skip to content
Newer
Older
100644 195 lines (178 sloc) 5.49 KB
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
1 #
3f74187 Rename RHOME to R_HOME.
hornik authored
2 # ${R_HOME}/Makefile
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
3
4 VPATH = @srcdir@
5 srcdir = @srcdir@
6 top_srcdir = @top_srcdir@
7
8 top_builddir = .
9
10 include $(top_builddir)/Makeconf
11
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
12 distdir = $(PACKAGE)-$(VERSION)
c7b5dc4 branch update - not bugfree
pd authored
13 INSTFILES = COPYING COPYRIGHTS FAQ MIRROR-SITES NEWS RESOURCES
14 DISTFILES = $(INSTFILES) \
fd3265c Fix installation bug.
hornik authored
15 BUGS INSTALL ONEWS README VERSION Y2K \
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
16 Makeconf.in Makefile.in \
8f71ebe Removed `PROJECTS'.
hornik authored
17 aclocal.m4 config.site configure configure.in \
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
18 date-stamp
63f4534 new R CMD check
leisch authored
19 SUBDIRS = src afm demos doc etc share tests tools
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
20
21 GZIP = --best
22
b2a3d9a Misc fixes and cleanups.
hornik authored
23 all: Makefile Makeconf R docs
1f7ea5b Rewrite.
hornik authored
24
ba6787e branch update
pd authored
25 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
e6f219c Improve automatic remaking.
hornik authored
26 @cd $(top_builddir) \
a16651d New targets Makefile and uninstall.
hornik authored
27 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
b2a3d9a Misc fixes and cleanups.
hornik authored
28 Makeconf: $(srcdir)/Makeconf.in $(top_builddir)/config.status
e6f219c Improve automatic remaking.
hornik authored
29 @cd $(top_builddir) \
b2a3d9a Misc fixes and cleanups.
hornik authored
30 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
31
32 config.status: $(srcdir)/configure
e6f219c Improve automatic remaking.
hornik authored
33 @$(SHELL) ./config.status --recheck
9c910a9 Use MAINTAINER_MODE_TRUE in srcdir dependencies.
hornik authored
34 $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
e6f219c Improve automatic remaking.
hornik authored
35 @cd $(srcdir) && autoconf
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
36
640f330 Build HTML versions of texinfo manuals.
hornik authored
37 R: Makefile
6f16fac branch update
pd authored
38 @if [ "$(srcdir)" != "." ]; then \
39 for f in $(INSTFILES); do \
40 $(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
41 done; \
42 fi
63f4534 new R CMD check
leisch authored
43 @for d in tools afm doc etc share src demos; do \
aa7eb80 branch update
pd authored
44 (cd $${d} && $(MAKE) R) || exit 1; \
0aaec01 Add demos in install and clean.
hornik authored
45 done
1f7ea5b Rewrite.
hornik authored
46 @if [ ! -f src/library/stamp-docs ]; then \
86f8f19 Install only front-end script to $(bindir).
hornik authored
47 echo "you should \`make docs' now ..."; \
1f7ea5b Rewrite.
hornik authored
48 fi
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
49
640f330 Build HTML versions of texinfo manuals.
hornik authored
50 docs: FORCE
51 -@(cd doc && $(MAKE) $@)
52 -@(cd src/library && $(MAKE) $@)
53 help html latex examples: FORCE
a16651d New targets Makefile and uninstall.
hornik authored
54 -@(cd src/library && $(MAKE) $@)
1f7ea5b Rewrite.
hornik authored
55 FORCE:
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
56
badb0d1 Do not rebuild before installing.
hornik authored
57 install: installdirs
63f4534 new R CMD check
leisch authored
58 @for d in afm demos doc etc share; do \
aa7eb80 branch update
pd authored
59 (cd $${d} && $(MAKE) $@) || exit 1; \
a16651d New targets Makefile and uninstall.
hornik authored
60 done
fd3265c Fix installation bug.
hornik authored
61 @for f in $(INSTFILES); do \
62 $(INSTALL_DATA) $(srcdir)/$${f} $(rhome); \
63 done
86f8f19 Install only front-end script to $(bindir).
hornik authored
64 @echo "installing executables ..."
69b136f Rename R binary to `R.bin'.
hornik authored
65 @$(INSTALL_PROGRAM) bin/R.bin $(rhome)/bin
8c38a94 branch update
pd authored
66 @sed "s@R_HOME=.*@R_HOME=$(rhome)\}@" < bin/R > $(rhome)/bin/R
67 @sed "s@R_HOME=.*@R_HOME=$(rhome)\}@" < bin/R > $(bindir)/R
aafd598 Branch update + setjmp problem fixup
pd authored
68 @chmod 755 $(bindir)/R $(rhome)/bin/R
142267f Ensure consistent MAIN_ and SHLIB_ naming.
hornik authored
69 @for f in `ls bin/*.$(SHLIB_EXT)`; do \
d57d433 move gnome install to R_HOME/gnome
ripley authored
70 $(INSTALL_PROGRAM) $${f} $(rhome)/bin; \
71 done
142267f Ensure consistent MAIN_ and SHLIB_ naming.
hornik authored
72 @if test -f gnome/R_gnome.$(SHLIB_EXT); then \
73 $(INSTALL_PROGRAM) gnome/R_gnome.$(SHLIB_EXT) $(rhome)/gnome; \
b19d7ab Improve installation.
hornik authored
74 fi
75 @for f in `find bin -type f -print \
5bdac57 remove fwf2table: no longer used.
ripley authored
76 | grep -v '^bin/R$$' \
b19d7ab Improve installation.
hornik authored
77 | grep -v '^bin/R_' \
78 | grep -v '^bin/R.bin'`; do \
79 $(INSTALL_SCRIPT) $${f} $(rhome)/bin; \
1f7ea5b Rewrite.
hornik authored
80 done
86f8f19 Install only front-end script to $(bindir).
hornik authored
81 @echo "installing headers ..."
1f7ea5b Rewrite.
hornik authored
82 @for f in include/*.h; do \
aa7eb80 branch update
pd authored
83 $(INSTALL_DATA) $${f} $(rhome)/include; \
1f7ea5b Rewrite.
hornik authored
84 done
097a571 Install header files in `R_ext', too.
hornik authored
85 @for f in include/R_ext/*.h; do \
86 $(INSTALL_DATA) $${f} $(rhome)/include/R_ext; \
87 done
86f8f19 Install only front-end script to $(bindir).
hornik authored
88 @echo "installing library ..."
e71c9a3 Improve treatment of ownership in library installation.
hornik authored
89 @cp -r library $(rhome) || \
90 (cd library; \
91 $(TAR) cf - [a-z]* | (cd $(rhome)/library; $(TAR) xof -))
86f8f19 Install only front-end script to $(bindir).
hornik authored
92 @echo " building help index ..."
a16651d New targets Makefile and uninstall.
hornik authored
93 @(cd $(rhome)/library; cat */TITLE > LibIndex 2> /dev/null)
86f8f19 Install only front-end script to $(bindir).
hornik authored
94 @echo " building HTML index ..."
e328ea0 Use R CMD interface when calling build-help.
hornik authored
95 @$(rhome)/bin/R CMD build-help --rhome $(rhome) --htmllists
afe5b25 Improve installdirs target.
hornik authored
96 installdirs:
1f7ea5b Rewrite.
hornik authored
97 @$(MKINSTALLDIRS) $(bindir)
98 @$(MKINSTALLDIRS) $(rhome)/bin
99 @$(MKINSTALLDIRS) $(rhome)/include
097a571 Install header files in `R_ext', too.
hornik authored
100 @$(MKINSTALLDIRS) $(rhome)/include/R_ext
1f7ea5b Rewrite.
hornik authored
101 @$(MKINSTALLDIRS) $(rhome)/library
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
102 install-strip:
103 $(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install
104 uninstall:
86f8f19 Install only front-end script to $(bindir).
hornik authored
105 @echo "uninstalling library ..."
a16651d New targets Makefile and uninstall.
hornik authored
106 @(cd $(rhome)/library; \
c7b5dc4 branch update - not bugfree
pd authored
107 for p in $(R_PKGS); do rm -rf $${p}; done)
86f8f19 Install only front-end script to $(bindir).
hornik authored
108 @echo " rebuilding help index ..."
9d3546e Improve uninstall.
hornik authored
109 @(cd $(rhome)/library; \
110 cat */TITLE > LibIndex 2> /dev/null || echo "" > LibIndex)
86f8f19 Install only front-end script to $(bindir).
hornik authored
111 @echo " rebuilding HTML index ..."
e328ea0 Use R CMD interface when calling build-help.
hornik authored
112 @if test -x $(rhome)/bin/R -a -f $(rhome)/bin/build-help; then \
113 $(rhome)/bin/R CMD build-help --rhome $(rhome) --htmllists; \
9d3546e Improve uninstall.
hornik authored
114 fi
86f8f19 Install only front-end script to $(bindir).
hornik authored
115 @echo "uninstalling headers ..."
a16651d New targets Makefile and uninstall.
hornik authored
116 @rm -rf $(rhome)/include
86f8f19 Install only front-end script to $(bindir).
hornik authored
117 @echo "uninstalling executables ..."
a16651d New targets Makefile and uninstall.
hornik authored
118 @rm -rf $(rhome)/bin
d57d433 move gnome install to R_HOME/gnome
ripley authored
119 @rm -rf $(rhome)/gnome
86f8f19 Install only front-end script to $(bindir).
hornik authored
120 @rm -f $(bindir)/R
c7b5dc4 branch update - not bugfree
pd authored
121 @for f in $(INSTFILES); do \
aa7eb80 branch update
pd authored
122 rm -f $(rhome)/$${f}; \
a16651d New targets Makefile and uninstall.
hornik authored
123 done
63f4534 new R CMD check
leisch authored
124 @for d in afm demos doc etc share; do \
aa7eb80 branch update
pd authored
125 (cd $${d} && $(MAKE) $@); \
a16651d New targets Makefile and uninstall.
hornik authored
126 done
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
127
1f7ea5b Rewrite.
hornik authored
128 mostlyclean: clean
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
129 clean:
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
130 @for d in $(SUBDIRS); do \
aa7eb80 branch update
pd authored
131 (cd $${d} && $(MAKE) $@); \
1f7ea5b Rewrite.
hornik authored
132 done
6f16fac branch update
pd authored
133 @if [ "$(srcdir)" != "." ]; then \
9013739 Cleaned up the clean target - it was missing a \ at the end of a line.
bates authored
134 rm -f $(INSTFILES); \
6f16fac branch update
pd authored
135 fi
1f7ea5b Rewrite.
hornik authored
136 distclean: clean
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
137 @for d in $(SUBDIRS); do \
138 (cd $${d} && $(MAKE) $@); \
1f7ea5b Rewrite.
hornik authored
139 done
ec31927 distcelan a little better
ripley authored
140 @rm -rf bin include library gnome
8d5746d Have make clean delete Makefrag.*
hornik authored
141 @rm -f Makeconf Makefile Makefile.bak Makefrag.* \
1f7ea5b Rewrite.
hornik authored
142 config.cache config.log config.status
143 maintainer-clean: distclean
86f8f19 Install only front-end script to $(bindir).
hornik authored
144 @echo "This command is intended for maintainers to use; it"
92e8dab Add warning about effects of maintainer-clean.
hornik authored
145 @echo "deletes files that may need special rules to rebuild"
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
146
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
147 dist: dist-unix
148 dist-unix: distdir
149 -chmod -R a+r $(distdir)
5e4482c Improve distdir.
hornik authored
150 GZIP=$(GZIP) $(TAR) chzf $(distdir).tar.gz $(distdir)
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
151 rm -rf $(distdir)
152 dist-win:
153 distdir: $(DISTFILES)
154 @rm -rf $(distdir)
155 @mkdir $(distdir)
156 @-chmod 755 $(distdir)
157 @for f in $(DISTFILES); do \
158 test -f $(distdir)/$${f} \
d061198 Replace leading spaces by tabs.
hornik authored
159 || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
160 || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
161 done
162 @for d in $(SUBDIRS); do \
163 test -d $(distdir)/$${d} \
164 || mkdir $(distdir)/$${d} \
165 || exit 1; \
166 chmod 755 $(distdir)/$${d}; \
167 (cd $${d} && $(MAKE) distdir) \
168 || exit 1; \
d061198 Replace leading spaces by tabs.
hornik authored
169 done
10da9f2 branch update
pd authored
170 @for d in debian; do \
5e4482c Improve distdir.
hornik authored
171 ((cd $(srcdir); $(TAR) -c -f - --exclude=CVS $${d}) \
172 | (cd $(distdir); $(TAR) -x -f -)) \
a2d7cb8 Remove `stamp-R' when updating.
hornik authored
173 || exit 1; \
174 done
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
175
d8e6946 Add target `pdf'.
hornik authored
176 dvi info pdf::
a16651d New targets Makefile and uninstall.
hornik authored
177 -@(cd doc && $(MAKE) $@)
10da9f2 branch update
pd authored
178 install-dvi install-info install-pdf::
179 -@(cd doc/manual && $(MAKE) $@)
180 uninstall-dvi uninstall-info uninstall-pdf::
181 -@(cd doc/manual && $(MAKE) $@)
e281dcf Merged from `Makefile' and `Makefile.2nd'.
hornik authored
182
183 TAGS:
184
af1b03b test-All, not just test-Examples
maechler authored
185 check test:: test-All
aa8b39a Renamed strict-tests to test-Specific.
hornik authored
186 test-All test-Examples test-Specific::
ba6787e branch update
pd authored
187 @(cd tests && $(MAKE) $@)
c7b5dc4 branch update - not bugfree
pd authored
188 check-force: test-All-force
189 test-All-force:
190 @(cd tests && $(MAKE) test-All FORCE=FORCE)
191 test-Examples-force:
192 @(cd tests && $(MAKE) test-Examples FORCE=FORCE)
193 test-Specific-force:
194 @(cd tests && $(MAKE) test-Specific FORCE=FORCE)
Something went wrong with that request. Please try again.