From 9042ff441cd931eeb4196651170797a688f82522 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Fri, 20 Mar 2015 12:03:56 +0000 Subject: 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. --- cfg.mk | 7 ++++--- 1 file 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 -- cgit v1.2.3-54-g00ecf