* 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>
+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>
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
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.