A word on the regex: \<\[ never matches, so the match instead
looks for a leading space in that case. Although configure.ac
should generally use test instead of [ (because the latter has
to be spelled [[ because of m4 processing), libvirt had a case
of the latter that would have been detected with this rule.
* top/maint.mk (sc_prohibit_test_minus_ao): Extend test.
Based on a libvirt report by Matthias Bolte.
Signed-off-by: Eric Blake <eblake@redhat.com>
2010-03-31 Eric Blake <eblake@redhat.com>
+ maint.mk: check for [ as well as test
+ * top/maint.mk (sc_prohibit_test_minus_ao): Extend test.
+ Based on a libvirt report by Matthias Bolte.
+
gnumakefile: don't squelch _version output
* top/GNUmakefile (_version): Create one-shot dependency rather
than using $(shell) when version must be regenerated.
_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
# Using test's -a and -o operators is not portable.
+# We prefer test over [, since the latter is spelled [[ in configure.ac.
sc_prohibit_test_minus_ao:
- @re='\<test .+ -[ao] ' \
- msg='$(_ptm1); $(_ptm2)' \
+ @re='(\<test| \[+) .+ -[ao] ' \
+ msg='$(_ptm1); $(_ptm2)' \
$(_prohibit_regexp)
# Each program that uses proper_name_utf8 must link with one of the