summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-15 15:05:26 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-15 15:08:22 (EDT)
commit00a5d39a97371fa99b2b0efff9796e34648a8230 (patch)
tree87a8e0be4265b544b5588fbf6db144276710d07f
parent12826f5f24b97a7c04d241cc6891464e846384bb (diff)
Makefile.in: Make install target non-recursive.
-rw-r--r--Makefile.in50
1 files changed, 39 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in
index 3e54a43..61a4f04 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,6 +31,7 @@ datadir = @datadir@
mandir = @mandir@
man1dir = @man1dir@
man3dir = @man3dir@
+localedir = @localedir@
sysconfdir = @sysconfdir@
metadata = @metadata@
@@ -166,17 +167,44 @@ clean-man3:
clean-locale:
@files='$(locale)'; $(clean_cmds)
-install: all
- @printf 'Installing executable files...\n'
- @cd src && $(MAKE) $(MACROS) install
- @printf 'Installing libary files...\n'
- @cd lib && $(MAKE) $(MACROS) install
- @cd lib/package && $(MAKE) $(MACROS) install
- @cd lib/metadata && $(MAKE) $(MACROS) install
- @printf 'Installing locales...\n'
- @cd locale && $(MAKE) $(MACROS) install
- @printf 'Installing manual pages...\n'
- @cd man && $(MAKE) $(MACROS) install
+install_cmds = \
+ set -e; \
+ mkdir -p "$(DESTDIR)/$${dir}"; \
+ for f in $${files}; do \
+ printf ' INSTALL %s\n' "$${f}"; \
+ ff="$$(basename "$${f}")"; \
+ cp "$${f}" "$(DESTDIR)/$${dir}/$${ff}"; \
+ chmod "$${mode}" "$(DESTDIR)/$${dir}/$${ff}"; \
+ done
+install: all install-exec install-data
+install-exec: all-exec install-bin install-pkglib install-pkglibpackage \
+ install-pkglibmetadata
+install-bin:
+ @files='$(bin)'; dir='$(bindir)'; mode='755'; $(install_cmds)
+install-pkglib:
+ @files='$(pkglib)'; dir='$(pkglibdir)'; mode='644'; $(install_cmds)
+install-pkglibpackage:
+ @files='$(pkglibpackage)'; dir='$(pkglibpackagedir)'; \
+ mode='644'; $(install_cmds)
+install-pkglibmetadata:
+ @files='$(pkglibmetadata)'; dir='$(pkglibmetadatadir)'; \
+ mode='644'; $(install_cmds)
+install-data: all-data install-man1 install-man3 install-locale
+install-man1:
+ @files='$(man1)'; dir='$(man1dir)'; mode='644'; $(install_cmds)
+install-man3:
+ @files='$(man3)'; dir='$(man3dir)'; mode='644'; $(install_cmds)
+install-locale:
+ @mkdir -p '$(DESTDIR)/$(localedir)'
+ @set -e; for f in $(locale); do \
+ printf ' INSTALL %s\n' "$${f}"; \
+ ff="$${f#*/}"; \
+ dd="$(DESTDIR)/$(localedir)/$${ff%/?*}/LC_MESSAGES"; \
+ mkdir -p "$${dd}"; \
+ df="$${dd}/$${ff##*/}"; \
+ cp "$${f}" "$${df}"; \
+ chmod 644 "$${df}"; \
+ done
uninstall:
@printf 'Uninstalling executable files...\n'