summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-03-20 12:03:56 +0000
committerPádraig Brady <P@draigBrady.com>2015-03-20 14:34:31 +0000
commit9042ff441cd931eeb4196651170797a688f82522 (patch)
tree29a8bf0335bbddb1accebaa7df9f4708ee146227
parent79e27fd67ed2c23b9cf01c42e3dae741559eb03c (diff)
downloadcoreutils-9042ff441cd931eeb4196651170797a688f82522.tar.xz
maint: really fix wildcard quoting in sc_tests_executable
* cfg.mk (sc_tests_executable): The previous commit avoided the globbing, but also passed on the quoted wildcards to find(1). We could use eval to handle the quoting, though that's a bit awkward and dangerous, so instead explicitly disable globbing for the whole make target subshell. Note noglob is not available on solaris, where we fall back to set -f. Note also that zsh uses set -F for this, but that's moot here. Also correct the find(1) expression to include the -o between each wildcard.
-rw-r--r--cfg.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/cfg.mk b/cfg.mk
index a3b0e8e1d..69a7776e6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -116,9 +116,10 @@ sc_tests_list_consistency:
# Ensure that all version-controlled test scripts are executable.
sc_tests_executable:
- @test_extensions_rx=`printf -- "-name '*%s' " $(TEST_EXTENSIONS)`;\
- find tests/ \( $$test_extensions_rx \) \! -perm -u+x -print \
- | sed -e "s/^/$(ME): Please make test executable: /" | grep . \
+ @set -o noglob 2>/dev/null || set -f; \
+ find_ext="-name '' "`printf -- "-o -name *%s " $(TEST_EXTENSIONS)`;\
+ find tests/ \( $$find_ext \) \! -perm -u+x -print \
+ | sed -e "s/^/$(ME): Please make test executable: /" | grep . \
&& exit 1; :
# Ensure all gnulib patches apply cleanly