summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-15 15:14:55 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-15 15:14:55 (EDT)
commitee050b3bb00a9f1d7880add3f136ccad5210469e (patch)
treef7c66da38dfd76c0fa9544fb8f7e511856c5b7dc
parent00a5d39a97371fa99b2b0efff9796e34648a8230 (diff)
Makefile.in: Make uninstall target non-recursive.
-rw-r--r--Makefile.in48
1 files changed, 37 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in
index 61a4f04..a4b6be7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,6 +20,7 @@
package_name = @package_name@
package_version = @package_version@
package_description = @package_description@
+package_library = @package_library@
srcdir = @srcdir@
prefix = @prefix@
@@ -206,17 +207,42 @@ install-locale:
chmod 644 "$${df}"; \
done
-uninstall:
- @printf 'Uninstalling executable files...\n'
- @cd src && $(MAKE) $(MACROS) uninstall
- @printf 'Uninstalling library files...\n'
- @cd lib/package && $(MAKE) $(MACROS) uninstall
- @cd lib/metadata && $(MAKE) $(MACROS) uninstall
- @cd lib && $(MAKE) $(MACROS) uninstall
- @printf 'Uninstalling locales...\n'
- @cd locale && $(MAKE) $(MACROS) uninstall
- @printf 'Uninstalling manual pages...\n'
- @cd man && $(MAKE) $(MACROS) uninstall
+uninstall_cmds = \
+ set -e; \
+ for f in $${files}; do \
+ printf ' RM %s\n' "$${f}"; \
+ ff="$$(basename "$${f}")"; \
+ rm -f "$(DESTDIR)/$${dir}/$${ff}"; \
+ done
+uninstall: uninstall-exec uninstall-data
+uninstall-exec: uninstall-bin uninstall-pkglibpackage uninstall-pkglibmetadata \
+ uninstall-pkglib
+uninstall-bin:
+ @files='$(bin)'; dir='$(bindir)'; $(uninstall_cmds)
+uninstall-pkglib:
+ @files='$(pkglib)'; dir='$(pkglibdir)'; $(uninstall_cmds)
+ @rmdir '$(DESTDIR)/$(pkglibdir)'
+uninstall-pkglibpackage:
+ @files='$(pkglibpackage)'; dir='$(pkglibpackagedir)'; \
+ $(uninstall_cmds)
+ @rmdir '$(DESTDIR)/$(pkglibpackagedir)'
+uninstall-pkglibmetadata:
+ @files='$(pkglibmetadata)'; dir='$(pkglibmetadatadir)'; \
+ $(uninstall_cmds)
+ @rmdir '$(DESTDIR)/$(pkglibmetadatadir)'
+uninstall-data: uninstall-man1 uninstall-man3 uninstall-locale
+uninstall-man1:
+ @files='$(man1)'; dir='$(man1dir)'; $(uninstall_cmds)
+uninstall-man3:
+ @files='$(man3)'; dir='$(man3dir)'; $(uninstall_cmds)
+uninstall-locale:
+ @set -e; for f in $(locale); do \
+ printf ' RM %s\n' "$${f}"; \
+ ff="$${f#*/}"; \
+ dd="$(DESTDIR)/$(localedir)/$${ff%/?*}/LC_MESSAGES"; \
+ df="$${dd}/$${ff##*/}"; \
+ rm -f "$${df}"; \
+ done
test: all
@printf 'Running tests...\n'