-
Notifications
You must be signed in to change notification settings - Fork 315
/
Makefile.in
99 lines (85 loc) · 2.91 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#
# ${R_HOME}/etc/Makefile
VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
subdir = etc
include $(top_builddir)/Makeconf
## <NOTE>
## Need target rules for all elements of SOURCES/OBJECTS.
SOURCES = Makeconf.in Renviron.in ldpaths.in
OBJECTS = $(SOURCES:.in=)
## </NOTE>
INSTFILES = repositories
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
DISTFILES = Makefile.in $(INSTFILES) $(SOURCES)
CLEANFILES =
DISTCLEANFILES = $(OBJECTS) Makefile
all: Makefile R
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
## <NOTE>
## Seems we need target rules for creating FOO from FOO.in: pattern
## rules ('%:%.in') are not portable, and some versions of Make do not
## allow separated dependencies for single suffix rules.
Makeconf: $(srcdir)/Makeconf.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Renviron: $(srcdir)/Renviron.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ldpaths: $(srcdir)/ldpaths.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
## </NOTE>
R: $(OBJECTS)
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} .; \
done \
fi
@if test -n "$(R_ARCH)" ; then \
$(MKINSTALLDIRS) .$(R_ARCH); \
for f in $(OBJECTS); do \
$(INSTALL_DATA) $${f} .$(R_ARCH); \
done \
fi
install: installdirs
@$(ECHO) "installing $(subdir) ..."
@$(INSTALL_DATA) $(srcdir)/repositories "$(DESTDIR)$(rhome)/$(subdir)"
@for f in $(OBJECTS); do \
$(INSTALL_DATA) $${f} "$(DESTDIR)$(rhome)/$(subdir)$(R_ARCH)"; \
done
installdirs:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rhome)/$(subdir)$(R_ARCH)"
install-strip: install
uninstall:
@$(ECHO) "uninstalling $(subdir) ..."
@if test -d "$(DESTDIR)$(rhome)/$(subdir)" \
&& test "`cd \"$(DESTDIR)$(rhome)\"; $(GETWD)`" \
!= "`cd $(top_builddir); $(GETWD)`"; then \
(cd "$(DESTDIR)$(rhome)/$(subdir)" && rm -f $(INSTFILES)); \
(cd "$(DESTDIR)$(rhome)/$(subdir)$(R_ARCH)" && rm -f $(OBJECTS)); \
if test -n "$(R_ARCH)"; then \
rmdir "$(DESTDIR)$(rhome)/$(subdir)$(R_ARCH)" 2> /dev/null ; \
fi ; \
rmdir "$(DESTDIR)$(rhome)/$(subdir)" 2> /dev/null \
|| $(ECHO) " subdir $(DESTDIR)$(subdir) not removed"; \
fi
mostlyclean: clean
clean:
-@test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES) ; \
fi
## do it this way to cope with subarchitectures
distclean: clean
-@test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
@if test -n "$(R_ARCH)"; then \
rm -rf .$(R_ARCH) ; \
fi
maintainer-clean: distclean
distdir: $(DISTFILES)
@for f in $(DISTFILES); do \
test -f $(distdir)/$${f} \
|| ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
|| cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
done