]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
syntax-check: improve prohibit_test_const_follows_var.
authorGary V. Vaughan <gary@gnu.org>
Fri, 21 Sep 2012 14:06:47 +0000 (21:06 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 21 Sep 2012 16:03:38 +0000 (23:03 +0700)
* cfg.mk (sc_prohibit_test_const_follows_var): Also flag errors
when the variable reference on the var side use ${brace_notation}.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
cfg.mk

diff --git a/cfg.mk b/cfg.mk
index fcaf39f9a286c534aec7619e0f6d7f3ee879a9fa..2cfd90cb5d51ac31deaa03c51e8fd5c3b579594a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -184,7 +184,7 @@ sc_prohibit_test_unary_operators:
 # when the other operand is a constant -- just swap them, and remove the
 # spurious leading `x'.
 sc_prohibit_test_const_follows_var:
-       @var='[  ]+"[^$$"]*\$$[0-9A-Za-z_][^"]*"'                       \
+       @var='[  ]+"[^$$"]*\$${?[0-9A-Za-z_][^"]*"'                     \
        op='[    ]+(!?=|-[lgn][et]|-eq)'                                \
        const='[         ]+[^-$$][^$$;   ]*'                            \
        prohibit='test'$$var$$op$$const'[        ]*(&&|\|\||;|\\?$$)'   \