The R Project SVN R

Rev

Rev 89103 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
74047 ripley 1
#
4580 hornik 2
# ${R_HOME}/src/include/Makefile
2150 hornik 3
 
4
VPATH = @srcdir@
5
srcdir = @srcdir@
6
top_srcdir = @top_srcdir@
7
 
8
top_builddir = ../..
2456 hornik 9
subdir = src/include
2150 hornik 10
 
11
include $(top_builddir)/Makeconf
12
 
11139 maechler 13
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
14
 
60260 ripley 15
## API(1): for .C() and .Call() writers _or_ for alternative front ends.
81984 kalibera 16
SRC_HEADERS = R.h Rdefines.h Rembedded.h Rinternals.h Rinterface.h
14069 hornik 17
## API(2) {these are built, system-dependently}:
17819 ripley 18
OBJ_HEADERS = Rconfig.h Rmath.h Rversion.h
11139 maechler 19
## Non-API internal ones:
61324 ripley 20
INT_HEADERS = Defn.h Errormsg.h Fileio.h Graphics.h GraphicsBase.h \
80514 ripley 21
   IOStuff.h Internal.h Parse.h Print.h Rconnections.h \
89100 luke 22
   Rdynpriv.h Rgraphics.h Rinlinedfuns.h Startup.h rlocale.h \
89697 hornik 23
   PrtUtil.h
2456 hornik 24
 
65036 ripley 25
DISTFILES = Makefile.in Makefile.win $(INT_HEADERS) $(SRC_HEADERS) \
66958 ripley 26
  config.h.in stamp-h.in Rmath.h0.in
11139 maechler 27
 
30050 ripley 28
SUBDIRS = R_ext
84353 ripley 29
SUBDIRS_WITH_NO_BUILD = Rmodules
15757 hornik 30
 
37381 ripley 31
TIMESTAMPS = $(SRC_HEADERS:.h=.ts) $(OBJ_HEADERS:.h=.tsa)
15757 hornik 32
 
32903 ripley 33
CLEANFILES = $(OBJ_HEADERS) stamp-R $(TIMESTAMPS) libintl.h
22861 ripley 34
DISTCLEANFILES = Makefile Rmath.h0 config.h stamp-h
18626 hornik 35
 
15757 hornik 36
.SUFFIXES:
37381 ripley 37
.SUFFIXES: .h .ts .tsa
15757 hornik 38
 
39
.h.ts:
37381 ripley 40
	@$(INSTALL_DATA) $< $(top_builddir)/include/`basename $<`
41
	@touch $@
42
.h.tsa:
37300 ripley 43
	@$(INSTALL_DATA) $< $(top_builddir)/include@R_ARCH@/`basename $<`
15757 hornik 44
	@touch $@
45
 
37381 ripley 46
 
4922 hornik 47
all: Makefile R
2150 hornik 48
 
4922 hornik 49
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
17897 hornik 50
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
4922 hornik 51
 
15757 hornik 52
R: Makefile stamp-R $(TIMESTAMPS)
53
	@for d in $(SUBDIRS); do \
54
	  (cd $${d} && $(MAKE) $@) || exit 1; \
55
	done
56
stamp-R:
37300 ripley 57
	@$(MKINSTALLDIRS) $(top_builddir)/include@R_ARCH@
15757 hornik 58
	@touch $@
23204 pd 59
$(TIMESTAMPS): stamp-R
2150 hornik 60
 
8729 hornik 61
config.h: stamp-h
8452 hornik 62
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
17897 hornik 63
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/config.h
43482 ripley 64
	@$(ECHO) timestamp > $@ 2> /dev/null
12778 pd 65
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-h.in
31412 ripley 66
$(srcdir)/stamp-h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(top_builddir)/aclocal.m4
67
	@TBD=`cd $(top_builddir); pwd`; \
68
	  cd $(top_srcdir) && $(AUTOHEADER) -I $${TBD}
43482 ripley 69
	@$(ECHO) timestamp > $@ 2> /dev/null
29912 ripley 70
Rconfig.h: config.h $(top_srcdir)/tools/GETCONFIG
26347 hornik 71
	@$(SHELL) $(top_srcdir)/tools/GETCONFIG > $@
34560 ripley 72
Rversion.h: $(top_srcdir)/VERSION $(top_srcdir)/tools/GETVERSION $(top_builddir)/SVN-REVISION
26347 hornik 73
	@$(SHELL) $(top_srcdir)/tools/GETVERSION > $@
22897 ripley 74
 
75
## <NOTE>
76
## we don't use AC_CONFIG_HEADERS on Rmath.h.in because
77
## a) that would comment out #undef statements in Rmath.h.in and
78
## b) Rmath.h should be a self-contained file for standalone Rmath use.
79
## </NOTE>
22859 ripley 80
Rmath.h: Rmath.h0
26347 hornik 81
	@$(SHELL) $(top_srcdir)/tools/copy-if-change Rmath.h0 $@
22859 ripley 82
Rmath.h0: $(srcdir)/Rmath.h0.in $(top_builddir)/config.status
17897 hornik 83
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
4922 hornik 84
 
54600 ripley 85
install: installdirs install-intl-@USE_INCLUDED_LIBINTL@
15770 hornik 86
	@for d in $(SUBDIRS); do \
87
	  (cd $${d} && $(MAKE) $@) || exit 1; \
88
	done
14068 hornik 89
	@for f in $(SRC_HEADERS); do \
41422 ripley 90
	  $(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rincludedir)"; \
14068 hornik 91
	done
92
	@for f in $(OBJ_HEADERS); do \
41422 ripley 93
	  $(INSTALL_DATA) $${f} "$(DESTDIR)$(rincludedir)@R_ARCH@"; \
14068 hornik 94
	done
95
installdirs:
41422 ripley 96
	@$(MKINSTALLDIRS) "$(DESTDIR)$(rincludedir)@R_ARCH@"
60583 ripley 97
install-intl-yes: installdirs
41422 ripley 98
	@$(INSTALL_DATA) libintl.h "$(DESTDIR)$(rincludedir)@R_ARCH@"
32903 ripley 99
install-intl-no:
100
 
14068 hornik 101
install-strip:
102
	$(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install
103
uninstall:
15757 hornik 104
	@for d in $(SUBDIRS); do \
105
	  (cd $${d} && $(MAKE) $@) || exit 1; \
106
	done
74046 ripley 107
	@rm -Rf "$(DESTDIR)$(rincludedir)"
14068 hornik 108
 
109
mostlyclean: clean
2150 hornik 110
clean:
15770 hornik 111
	@for d in $(SUBDIRS); do (cd $${d} && $(MAKE) $@); done
18626 hornik 112
	-@test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
9200 ripley 113
distclean: clean
15770 hornik 114
	@for d in $(SUBDIRS); do (cd $${d} && $(MAKE) $@); done
18626 hornik 115
	-@test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
2150 hornik 116
maintainer-clean: distclean
2198 hornik 117
 
14068 hornik 118
TAGS info dvi check:
2456 hornik 119
 
120
distdir: $(DISTFILES)
121
	@for f in $(DISTFILES); do \
122
	  test -f $(distdir)/$${f} \
123
	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
124
	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
125
	done
7892 hornik 126
	@for d in $(SUBDIRS); do \
15757 hornik 127
	  test -d $(distdir)/$${d} \
128
	    || mkdir $(distdir)/$${d} \
129
	    || exit 1; \
130
	  chmod 755 $(distdir)/$${d}; \
131
	  (cd $${d} && $(MAKE) distdir) \
132
	    || exit 1; \
7892 hornik 133
	done
30050 ripley 134
	@for d in $(SUBDIRS_WITH_NO_BUILD); do \
30438 hornik 135
	  ((cd $(srcdir); $(TAR) -c -f - $(DISTDIR_TAR_EXCLUDE) $${d}) \
30050 ripley 136
	      | (cd $(distdir); $(TAR) -x -f -)) \
137
	    || exit 1; \
138
	done