]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Testsuite: do not use `chmod -R' when cleaning up.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 6 Oct 2009 15:01:23 +0000 (17:01 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Oct 2009 11:26:15 +0000 (13:26 +0200)
* tests/Makefile.am (clean-local-check): Do not use `chmod -R' on
the test directories, as that may change or try to change the mode
of installed files: the test directory may contain symlinks to
ltmain.sh files from a Libtool installation, and Solaris `chmod -R'
touches symlink targets.  Instead, use the cleanup strategy used
in distdir.am (which is also employed in tests/defs.in).

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/Makefile.am
tests/Makefile.in

index 9e45e73b1bdb6f6d33697a4da9304a79f88b0473..3bcad47cc6c11dcbd9d8ef9edcb35b98b21627ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Testsuite: do not use `chmod -R' when cleaning up.
+       * tests/Makefile.am (clean-local-check): Do not use `chmod -R' on
+       the test directories, as that may change or try to change the mode
+       of installed files: the test directory may contain symlinks to
+       ltmain.sh files from a Libtool installation, and Solaris `chmod -R'
+       touches symlink targets.  Instead, use the cleanup strategy used
+       in distdir.am (which is also employed in tests/defs.in).
+
 2009-10-06  Bruno Haible  <bruno@clisp.org>
            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
index bab2ac319475741ced634d96b6ba451fb278761f..3d52ba8fbb89c9e476d3c915fefe4f0f363ccf34 100644 (file)
@@ -745,5 +745,11 @@ check_SCRIPTS = defs defs-p aclocal-$(APIVERSION) automake-$(APIVERSION)
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-       -chmod -R u+rwx *.dir
-       -rm -rf defs-p *.dir
+       -set x *.dir; shift; \
+        if test "$$#,$$1" = "1,*.dir"; then \
+          : there is no test directory to clean; \
+        else \
+          find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+          rm -rf "$$@"; \
+        fi;
+       -rm -f defs-p
index 02fa60ae3b1b5a77f0f23c5e39598db1f9bbd4bf..ddd8d7139528076ed84f10f5aa84387b6baa5043 100644 (file)
@@ -1338,8 +1338,14 @@ defs-p: defs Makefile.am
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-       -chmod -R u+rwx *.dir
-       -rm -rf defs-p *.dir
+       -set x *.dir; shift; \
+        if test "$$#,$$1" = "1,*.dir"; then \
+          : there is no test directory to clean; \
+        else \
+          find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+          rm -rf "$$@"; \
+        fi;
+       -rm -f defs-p
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.