summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-05-05 17:03:13 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-05-05 17:13:45 (EDT)
commita38b833d2d658d8836e329a97baed962b2c5dc73 (patch)
treeaf4a6b03fd382ffd51ff174939c75086241d18c9 /Makefile.in
parent72a1e22cc5ddc24886a2c6c86252ff616449bba7 (diff)
Make src/ non-recursive.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in60
1 files changed, 44 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index c699c11..3c5085c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,15 +45,25 @@ MACROS = \
'libopkbuild_1=$(libopkbuild_1)' \
'archtab=$(archtab)'
-distdir = $(package_name)-$(package_version)
-distfiles = configure Makefile.in COPYING.2 COPYING.3 \
- README INSTALL ChangeLog TODO
-
.SUFFIXES:
-all:
- @printf 'Making executable files...\n'
- @cd src && $(MAKE) $(MACROS) all
+include $(srcdir)/src/local.mk
+
+bin = $(src_bin)
+
+distdir = $(package_name)-$(package_version)
+distfiles = \
+ configure \
+ Makefile.in \
+ COPYING.2 \
+ COPYING.3 \
+ README \
+ INSTALL \
+ ChangeLog \
+ TODO \
+ $(src_distfiles)
+
+all: all-exec
@printf 'Making library files...\n'
@cd lib && $(MAKE) $(MACROS) all
@cd lib/buildsystem && $(MAKE) $(MACROS) all
@@ -61,10 +71,10 @@ all:
@cd locale && $(MAKE) $(MACROS) all
@printf 'Making manual pages...\n'
@cd man && $(MAKE) $(MACROS) all
+all-exec: all-bin
+all-bin: $(bin)
-clean:
- @printf 'Cleaning executable files...\n'
- @cd src && $(MAKE) $(MACROS) clean
+clean: clean-exec
@printf 'Cleaning library files...\n'
@cd lib && $(MAKE) $(MACROS) clean
@cd lib/buildsystem && $(MAKE) $(MACROS) clean
@@ -72,10 +82,14 @@ clean:
@cd locale && $(MAKE) $(MACROS) clean
@printf 'Cleaning manual pages...\n'
@cd man && $(MAKE) $(MACROS) clean
+clean-exec: clean-bin
+clean-bin:
+ @for f in $(bin); do \
+ printf ' RM %s\n' "$${f}"; \
+ rm -f "$${f}"; \
+ done
-install: all
- @printf 'Installing executable files...\n'
- @cd src && $(MAKE) $(MACROS) install
+install: all install-exec
@printf 'Installing library files...\n'
@cd lib && $(MAKE) $(MACROS) install
@cd lib/buildsystem && $(MAKE) $(MACROS) install
@@ -83,10 +97,17 @@ install: all
@cd locale && $(MAKE) $(MACROS) install
@printf 'Installing manual pages...\n'
@cd man && $(MAKE) $(MACROS) install
+install-exec: install-bin
+install-bin:
+ @mkdir -p '$(DESTDIR)/$(bindir)'
+ @for f in $(bin); do \
+ printf ' INSTALL %s\n' "$${f}"; \
+ ff="$$(basename "$${f}")"; \
+ cp "$${f}" "$(DESTDIR)/$(bindir)/$${ff}"; \
+ chmod 755 "$(DESTDIR)/$(bindir)/$${ff}"; \
+ done
-uninstall:
- @printf 'Uninstalling executable files...\n'
- @cd src && $(MAKE) $(MACROS) uninstall
+uninstall: uninstall-exec
@printf 'Uninstalling library files...\n'
@cd lib/buildsystem && $(MAKE) $(MACROS) uninstall
@cd lib && $(MAKE) $(MACROS) uninstall
@@ -94,6 +115,13 @@ uninstall:
@cd locale && $(MAKE) $(MACROS) uninstall
@printf 'Uninstalling manual pages...\n'
@cd man && $(MAKE) $(MACROS) uninstall
+uninstall-exec: uninstall-bin
+uninstall-bin:
+ @for f in $(bin); do \
+ printf ' RM %s\n' "$${f}"; \
+ ff="$$(basename "$${f}")"; \
+ rm -f "$(DESTDIR)/$(bindir)/$${ff}"; \
+ done
$(distdir):
@mkdir -p '$(distdir)'