]> sourceware.org Git - automake.git/commitdiff
* NEWS: Mention distuninstallcheck.
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 25 Sep 2002 13:25:53 +0000 (13:25 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 25 Sep 2002 13:25:53 +0000 (13:25 +0000)
* automake.texi (Dist): Document new macro and target.
* lib/am/distdir.am (distuninstallcheck_listfiles): New macro.
(distuninstallcheck): New target.
(distcheck): Use distuninstallcheck.

ChangeLog
NEWS
automake.texi
lib/am/distdir.am
stamp-vti
version.texi

index 8e15c1126892c2efbfc7b8ba0836e7c3486e4f07..c48e28d9aa0eba9dcf5cae39bc82bb448eb749ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-25  Tom Tromey  <tromey@redhat.com>
+
+       * NEWS: Mention distuninstallcheck.
+       * automake.texi (Dist): Document new macro and target.
+       * lib/am/distdir.am (distuninstallcheck_listfiles): New macro.
+       (distuninstallcheck): New target.
+       (distcheck): Use distuninstallcheck.
+
 2002-09-25  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * tests/specflags7.test (true_CFLAGS, false_CFLAGS, false.c): Use
diff --git a/NEWS b/NEWS
index 55ab0010670136aefb4af37d1c4b6b9ec7dcf65b..4a8e756ff60f59fec48becaf9d3176387208155b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@ New in 1.6f:
 * Add support for extending aclocal's default macro search path
   using a `dirlist' file within the aclocal directory.
 * automake --output-dir is deprecated.
+* The part of the distcheck target that checks whether uninstall actually
+  removes all installed files has been moved in a separate target,
+  distuninstallcheck, so it can be overridden easily.
 * Many bug fixes.
 \f
 New in 1.6:
index 909252999e7f03ed1850a257bc98d0a47c6f56fe..1ddff23f7dda616cd68c48360bfb0f736698bb23 100644 (file)
@@ -4175,6 +4175,8 @@ dist-hook:
 @cindex make distcheck
 @cindex make distcleancheck
 @vindex distcleancheck_listfiles
+@cindex make distuninstallcheck
+@vindex distuninstallcheck_listfiles
 
 Automake also generates a @code{distcheck} target which can be of help
 to ensure that a given distribution will actually work.
@@ -4235,6 +4237,26 @@ build the package.  (Think about the user missing the tool required to
 build the file; or if the required tool is built by your package,
 consider the cross-compilation case where it can't be run.)
 
+@code{distcheck} also checks that the @code{uninstall} target works
+properly, both for ordinary and @samp{DESTDIR} builds.  It does this
+by invoking @code{make uninstall}, and then it checks the install tree
+to see if any files are left over.  This check will make sure that you
+correctly coded your @code{uninstall}-related targets.
+
+By default, the checking is done by the @code{distuninstallcheck} target,
+and the list of files in the install tree is generated by
+@code{$(distuninstallcheck_listfiles}) (this is a variable whose value is
+a shell command to run that prints the list of files to stdout).
+
+Either of these can be overridden to modify the behavior of
+@code{distcheck}.  For instance, to disable this check completely, you
+would write:
+
+@example
+distuninstallcheck:
+        @@:
+@end example
+
 @section The types of distributions
 
 @trindex dist-gzip
index 7ee940eecccc38d5f50a843ff326a26359861c3d..946a96d15fb71084b9a0fa695447497e6e6016c2 100644 (file)
@@ -303,6 +303,9 @@ distcheck: dist
 ## create this directory under $dc_install_base, because it would
 ## create very long directory names.
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+## Build the directory, so we can cd into it even if `make install'
+## didn't create it.
+         && $(mkinstalldirs) $$dc_destdir \
 ?DISTCHECK-HOOK?         && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
          && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
@@ -316,26 +319,21 @@ distcheck: dist
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
          && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-## We use -le 1 because the `dir' file might still exist after uninstall.
-         && (test `find "$$dc_install_base" -type f -print | wc -l` -le 1 \
-             || { echo "ERROR: files left after uninstall:" ; \
-                  find $$dc_install_base -type f -print ; \
-                  exit 1; } >&2 ) \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
 ## Make sure the package has proper DESTDIR support (we could not test this
 ## in the previous install/installcheck/uninstall test, because it's reasonable
-## for installcheck to fails in a DESTDIR install).
+## for installcheck to fail in a DESTDIR install).
 ## We make the `$dc_install_base' read-only because this is where files
 ## with missing DESTDIR support are likely to be installed.
          && chmod -R a-w "$$dc_install_base" \
-## The logic here is quire convoluted because we must clean $dc_destdir
+## The logic here is quite convoluted because we must clean $dc_destdir
 ## whatever happens (it won't be erased by the next run of distcheck like
-## $(dirstir) is).
+## $(distdir) is).
          && ({   $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && (test `find "$$dc_destdir" -type f -print | wc -l` -le 1 \
-                  || { echo "ERROR: files left after uninstall (check DESTDIR support):" ; \
-                       find "$$dc_destdir" -type f -print ; \
-                       exit 1; } >&2 ); \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
              } || { rm -rf "$$dc_destdir"; exit 1; }) \
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
@@ -347,8 +345,24 @@ distcheck: dist
        @echo "$(distdir).tar.gz is ready for distribution" | \
          sed 'h;s/./=/g;p;x;p;x'
 
+## Define distuninstallcheck_listfiles and distuninstallcheck separately
+## from distcheck, so that they can be overridden by the user.
+.PHONY: distuninstallcheck
+distuninstallcheck_listfiles = find . -type f -print
+distuninstallcheck:
+## We use -le 1 because the `dir' file might still exist after
+## uninstall.
+       cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+
 ## Define distcleancheck_listfiles and distcleancheck separately
-## from distcheck, so that they can be overriden by the user.
+## from distcheck, so that they can be overridden by the user.
 .PHONY: distcleancheck
 distcleancheck_listfiles = find . -type f -print
 distcleancheck: distclean
index e4420df3d4870935396d5a9daa7bbfa704efed0d..c701fcf51db12cb374961deba53b250292c49409 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 22 September 2002
+@set UPDATED 25 September 2002
 @set UPDATED-MONTH September 2002
 @set EDITION 1.6g
 @set VERSION 1.6g
index e4420df3d4870935396d5a9daa7bbfa704efed0d..c701fcf51db12cb374961deba53b250292c49409 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 22 September 2002
+@set UPDATED 25 September 2002
 @set UPDATED-MONTH September 2002
 @set EDITION 1.6g
 @set VERSION 1.6g
This page took 0.053717 seconds and 5 git commands to generate.