From: Ralf Wildenhues Date: Tue, 4 Nov 2008 21:42:23 +0000 (+0100) Subject: Multiple 'make uninstall' should not fail even for TEXINFOS. X-Git-Tag: v1.10b~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d016ef1e5d42bce1775b7b39e3dab89f392f27d7;p=thirdparty%2Fautomake.git Multiple 'make uninstall' should not fail even for TEXINFOS. * lib/am/texinfos.am (uninstall-info-am): Do not fail due to install-info if the installed file does not exist (any more). * tests/txinfo26.test: Issue multiple `make uninstall'. * tests/instmany-mans.test: Likewise. * tests/instmany-python.test: Likewise. * tests/instmany.test: Likewise. * tests/txinfo26.test: Likewise. * NEWS: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index a6c63a2a1..c5ed954a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-11-04 Ralf Wildenhues + + Multiple 'make uninstall' should not fail even for TEXINFOS. + * lib/am/texinfos.am (uninstall-info-am): Do not fail due to + install-info if the installed file does not exist (any more). + * tests/txinfo26.test: Issue multiple `make uninstall'. + * tests/instmany-mans.test: Likewise. + * tests/instmany-python.test: Likewise. + * tests/instmany.test: Likewise. + * tests/txinfo26.test: Likewise. + * NEWS: Update. + 2008-11-03 Ralf Wildenhues New public macro AM_SUBST_NOTMAKE. diff --git a/NEWS b/NEWS index 483416593..276e95375 100644 --- a/NEWS +++ b/NEWS @@ -73,7 +73,8 @@ New in 1.10a: installation directory now, when no build-local scripts are used. For builtin rules, `make install' now fails reliably if installation - of a file failed. + of a file failed. Conversely, `make uninstall' even succeeds when + issued multiple times. These changes may need some adjustments from users: For example, some `install' programs refuse to install multiple copies of the diff --git a/doc/Makefile.in b/doc/Makefile.in index a8b4a70f7..a64f13cdc 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -355,7 +355,8 @@ uninstall-info-am: for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 9cfc645db..382a7c874 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -306,8 +306,11 @@ uninstall-info-am: relfile=`echo "$$file" | sed 's|^.*/||'`; \ ## install-info needs the actual info file. We use the installed one, ## rather than relying on one still being in srcdir or builddir. +## However, `make uninstall && make uninstall' should not fail, +## so we ignore failure if the file did not exist. echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test index 3f331a665..773fa76ce 100755 --- a/tests/instmany-mans.test +++ b/tests/instmany-mans.test @@ -117,6 +117,8 @@ cd build $MAKE # Try whether native install (or install-sh) works. $MAKE install +# Multiple uninstall should work, too. +$MAKE uninstall $MAKE uninstall test `find "$instdir" -type f -print | wc -l` = 0 diff --git a/tests/instmany-python.test b/tests/instmany-python.test index beace0c1c..9f652379c 100755 --- a/tests/instmany-python.test +++ b/tests/instmany-python.test @@ -106,6 +106,8 @@ cd build $MAKE # Try whether native install (or install-sh) works. $MAKE install +# Multiple uninstall should work, too. +$MAKE uninstall $MAKE uninstall test `find "$instdir" -type f -print | wc -l` = 0 diff --git a/tests/instmany.test b/tests/instmany.test index f67e6faa3..31176d727 100755 --- a/tests/instmany.test +++ b/tests/instmany.test @@ -132,6 +132,8 @@ cd build $MAKE # Try whether native install (or install-sh) works. $MAKE install +# Multiple uninstall should work, too. +$MAKE uninstall $MAKE uninstall test `find "$instdir" -type f -print | wc -l` = 0 diff --git a/tests/txinfo26.test b/tests/txinfo26.test index 52a7f782a..87b4ba695 100755 --- a/tests/txinfo26.test +++ b/tests/txinfo26.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -64,3 +64,6 @@ test -f _inst/info/main.info $MAKE uninstall test ! -f _inst/info/main.info test -f ../main.info + +# multiple uninstall should not fail. +$MAKE uninstall