From: Stefano Lattarini Date: Tue, 6 Oct 2009 15:01:23 +0000 (+0200) Subject: Testsuite: do not use `chmod -R' when cleaning up. X-Git-Tag: v1.11.1~8^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7810f032b6eeef0870bc29539b2c6a32b94d10a;p=thirdparty%2Fautomake.git 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). Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 9e45e73b1..3bcad47cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-10-07 Stefano Lattarini + + 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 Ralf Wildenhues diff --git a/tests/Makefile.am b/tests/Makefile.am index bab2ac319..3d52ba8fb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/Makefile.in b/tests/Makefile.in index 02fa60ae3..ddd8d7139 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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.