diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-03 21:56:08 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-03 22:57:11 +0200 |
commit | 51ea4f3ffc52524f88e01fd9e583e90fd2a537b7 (patch) | |
tree | a9c60e8b1195440273cea87cae8c40fff6548c5e /Makefile.am | |
parent | 5e0539a3cc36e426e315ebf55df95b78f4822235 (diff) | |
download | automake-51ea4f3ffc52524f88e01fd9e583e90fd2a537b7.tar.gz |
build: fix cleaning of test directories in contrib (and in t/perf)
* Makefile.am (clean-local-check): Update recipe to cater to the fact
that some tests using a temporary directory have been placed in other
directories that the 't/' directory (for the moment, at least 't/perf'
and 'contrib/t').
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index f05e82db5..d28f3c7ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -432,13 +432,16 @@ installcheck-testsuite: clean-local: clean-local-check .PHONY: clean-local-check clean-local-check: - -set x t/*.dir; shift; \ - if test "$$#,$$1" = "1,*.dir"; then \ - : there is no test directory to clean; \ - else \ - find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \ - rm -rf "$$@"; \ - fi; +## Directries candidate to be test directories match this wildcard. + @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \ +## The 'nullglob' bash option is not portable, so use perl. + dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \ + if test -n "$$dirs"; then \ +## Errors in find are acceptable, errors in rm are not. + find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \ + echo " rm -rf $$dirs"; \ + rm -rf $$dirs || exit 1; \ + fi ## ---------------- ## |