]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
maint: relax 'sc_prohibit_test_dollar' check
authorPavel Raiskup <praiskup@redhat.com>
Thu, 25 Jun 2015 12:53:28 +0000 (14:53 +0200)
committerPavel Raiskup <praiskup@redhat.com>
Sat, 26 Sep 2015 16:00:17 +0000 (18:00 +0200)
* cfg.mk (sc_prohibit_test_dollar): White-list the
'test ${VAR+y}' construct because that is autoconf-suggested
portable way to check for unset variable.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index fdc21a1ed0d898c82645ab7c7e3a44a8cbacbc2c..6767b2d52ea5603c04c47dfe0814dfdfe0af6819 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -176,7 +176,8 @@ sc_prohibit_test_binary_operators:
 exclude_file_name_regexp--sc_prohibit_test_dollar = ^cfg.mk$$
 sc_prohibit_test_dollar:
        @prohibit='test[         ]+(![   ])?(-.[         ]+)?X?\$$[^?#]' \
-       halt='use '\''test "$$..."'\'' instead of '\''test $$'\'                \
+       exclude='test \$${[A-Za-z_][A-Za-z0-9_]+\+y}'                   \
+       halt='use '\''test "$$..."'\'' instead of '\''test $$'\'        \
          $(_sc_search_regexp)
 
 # Never use test -e.