From 1077034a9780b44b6ad992cf1d0ea61579038aa2 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 | 6 +++++- tests/Makefile.in | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c76e559..9aabfdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-10-06 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..c1bf53a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -745,5 +745,9 @@ 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 + -for d in *.dir; do \ + if test -d "$$d"; then \ + find "$$d" -type d '!' -perm -200 -exec chmod u+w {} ';'; \ + else :; fi; \ + done -rm -rf defs-p *.dir diff --git a/tests/Makefile.in b/tests/Makefile.in index de86e68..e49fe47 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1345,7 +1345,11 @@ defs-p: defs Makefile.am clean-local: clean-local-check .PHONY: clean-local-check clean-local-check: - -chmod -R u+rwx *.dir + -for d in *.dir; do \ + if test -d "$$d"; then \ + find "$$d" -type d '!' -perm -200 -exec chmod u+w {} ';'; \ + else :; fi; \ + done -rm -rf defs-p *.dir # Tell versions [3.59,3.63) of GNU make to not export all variables. -- 1.6.3.3