From 73fb9764019046d3d2dbd40dc711c8c8a0293b27 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Tue, 6 Oct 2009 17:01:23 +0200 Subject: [PATCH] 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). --- ChangeLog | 10 ++++++++++ tests/Makefile.am | 10 ++++++++-- tests/Makefile.in | 10 ++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c76e559..6803f0e 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-09-25 Ralf Wildenhues Use silent-rules for building the Automake package. diff --git a/tests/Makefile.am b/tests/Makefile.am index 7f6910b..6f8b977 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 de86e68..479bcfd 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1345,8 +1345,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. -- 1.6.3.3