[PATCH 3/7] Fix the liveinst install/uninstall hooks

David Shea dshea at redhat.com
Fri Nov 8 14:57:30 UTC 2013


Use the autoconf utility macros in the install hook.

Remove the uninstall hook entirely, because 1) removing all the parent
directories of $(DESTDIR)$(bindir) looks like the kind of thing we
really shouldn't try to do, and 2) there was a syntax error in it
anyway. Automake uninstall targets don't remove directories on the
assumption that if someone really wants $bindir gone they can do it
themselves, so let's follow that and ignore the problem.
---
 configure.ac              |  1 +
 data/liveinst/Makefile.am | 13 ++-----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 48c0061..412de1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,7 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
+AC_PROG_MKDIR_P
 
 # Check for the intltool programs
 # These checks and subsitutions are adapted IT_PROG_INTLTOOL provided in
diff --git a/data/liveinst/Makefile.am b/data/liveinst/Makefile.am
index 7274b3f..33ea69c 100644
--- a/data/liveinst/Makefile.am
+++ b/data/liveinst/Makefile.am
@@ -38,14 +38,5 @@ MAINTAINERCLEANFILES = Makefile.in
 @INTLTOOL_DESKTOP_RULE@
 
 install-exec-local:
-	mkdir -p $(DESTDIR)$(bindir)
-	ln -s consolehelper $(DESTDIR)$(bindir)/liveinst
-
-uninstall-local:
-	rm -f $(DESTDIR)$(bindir)/liveinst
-	for d in $(DESTDIR)$(bindir) ; do
-		while [ ! -z "$$d" ]; do \
-			rmdir $$d 2>/dev/null ; \
-			d="`dirname $$d`" ; \
-		done ; \
-	done
+	$(MKDIR_P) $(DESTDIR)$(bindir)
+	$(LN_S) consolehelper $(DESTDIR)$(bindir)/liveinst
-- 
1.8.4.2



More information about the anaconda-patches mailing list