The R Project SVN R

Rev

Rev 61324 | Rev 66958 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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