The R Project SVN R

Rev

Rev 23204 | Rev 29960 | 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
 
14069 hornik 15
## API(1): for .C() and .Call() writers, ...:
20423 murrell 16
SRC_HEADERS = R.h S.h Rdefines.h Rdevices.h Rgraphics.h Rinternals.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:
20423 murrell 20
INT_HEADERS = Defn.h Errormsg.h Fileio.h Graphics.h IOStuff.h \
15776 hornik 21
  Internal.h Parse.h Print.h Rconnections.h Rdynpriv.h Startup.h
2456 hornik 22
 
12778 pd 23
DISTFILES = Makefile.in README $(INT_HEADERS) $(SRC_HEADERS) \
22859 ripley 24
  config.h.in stamp-h.in Rmath.h0.in
11139 maechler 25
 
15757 hornik 26
SUBDIRS = R_ext
27
 
28
TIMESTAMPS = $(SRC_HEADERS:.h=.ts) $(OBJ_HEADERS:.h=.ts)
29
 
18626 hornik 30
CLEANFILES = $(OBJ_HEADERS) stamp-R $(TIMESTAMPS)
22861 ripley 31
DISTCLEANFILES = Makefile Rmath.h0 config.h stamp-h
18626 hornik 32
 
15757 hornik 33
.SUFFIXES:
34
.SUFFIXES: .h .ts
35
 
36
.h.ts:
37
	@$(INSTALL_DATA) $< $(top_builddir)/include/`basename $<`
38
	@touch $@
39
 
4922 hornik 40
all: Makefile R
2150 hornik 41
 
4922 hornik 42
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
17897 hornik 43
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
4922 hornik 44
 
15757 hornik 45
R: Makefile stamp-R $(TIMESTAMPS)
46
	@for d in $(SUBDIRS); do \
47
	  (cd $${d} && $(MAKE) $@) || exit 1; \
48
	done
49
stamp-R:
50
	@$(MKINSTALLDIRS) $(top_builddir)/include
51
	@touch $@
23204 pd 52
$(TIMESTAMPS): stamp-R
2150 hornik 53
 
8729 hornik 54
config.h: stamp-h
8452 hornik 55
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
17897 hornik 56
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/config.h
12778 pd 57
	@echo timestamp > $@ 2> /dev/null
58
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-h.in
17897 hornik 59
$(srcdir)/stamp-h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
10904 hornik 60
	@cd $(top_srcdir) && $(AUTOHEADER)
12778 pd 61
	@echo timestamp > $@ 2> /dev/null
18626 hornik 62
Rconfig.h: config.h
26347 hornik 63
	@$(SHELL) $(top_srcdir)/tools/GETCONFIG > $@
6098 pd 64
Rversion.h: $(top_srcdir)/VERSION $(top_srcdir)/date-stamp
26347 hornik 65
	@$(SHELL) $(top_srcdir)/tools/GETVERSION > $@
22897 ripley 66
 
67
## <NOTE>
68
## we don't use AC_CONFIG_HEADERS on Rmath.h.in because
69
## a) that would comment out #undef statements in Rmath.h.in and
70
## b) Rmath.h should be a self-contained file for standalone Rmath use.
71
## </NOTE>
22859 ripley 72
Rmath.h: Rmath.h0
26347 hornik 73
	@$(SHELL) $(top_srcdir)/tools/copy-if-change Rmath.h0 $@
22859 ripley 74
Rmath.h0: $(srcdir)/Rmath.h0.in $(top_builddir)/config.status
17897 hornik 75
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
4922 hornik 76
 
14068 hornik 77
install: installdirs
15770 hornik 78
	@for d in $(SUBDIRS); do \
79
	  (cd $${d} && $(MAKE) $@) || exit 1; \
80
	done
14068 hornik 81
	@for f in $(SRC_HEADERS); do \
82
	  $(INSTALL_DATA) $(srcdir)/$${f} $(rhome)/include; \
83
	done
84
	@for f in $(OBJ_HEADERS); do \
85
	  $(INSTALL_DATA) $${f} $(rhome)/include; \
86
	done
87
installdirs:
88
	@$(MKINSTALLDIRS) $(rhome)/include
89
install-strip:
90
	$(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install
91
uninstall:
15757 hornik 92
	@for d in $(SUBDIRS); do \
93
	  (cd $${d} && $(MAKE) $@) || exit 1; \
94
	done
14068 hornik 95
	@rm -rf $(rhome)/include
96
 
97
mostlyclean: clean
2150 hornik 98
clean:
15770 hornik 99
	@for d in $(SUBDIRS); do (cd $${d} && $(MAKE) $@); done
18626 hornik 100
	-@test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
9200 ripley 101
distclean: clean
15770 hornik 102
	@for d in $(SUBDIRS); do (cd $${d} && $(MAKE) $@); done
18626 hornik 103
	-@test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
2150 hornik 104
maintainer-clean: distclean
2198 hornik 105
 
14068 hornik 106
TAGS info dvi check:
2456 hornik 107
 
108
distdir: $(DISTFILES)
109
	@for f in $(DISTFILES); do \
110
	  test -f $(distdir)/$${f} \
111
	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
112
	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
113
	done
7892 hornik 114
	@for d in $(SUBDIRS); do \
15757 hornik 115
	  test -d $(distdir)/$${d} \
116
	    || mkdir $(distdir)/$${d} \
117
	    || exit 1; \
118
	  chmod 755 $(distdir)/$${d}; \
119
	  (cd $${d} && $(MAKE) distdir) \
120
	    || exit 1; \
7892 hornik 121
	done