On 03/25/2010 02:22 AM, Jim Meyering wrote: >> -# Using test's -a operator is not portable. >> -sc_prohibit_test_minus_a: >> +# Using test's -a and -o operators is not portable. >> +sc_prohibit_test_minus_ao: >> @re='\<test .+ -[a] ' \ >> msg='use "test C1 && test C2, not "test C1 -''a C2"' \ >> $(_prohibit_regexp) >> + @re='\<test .+ -[o] ' \ >> + msg='use "test C1 || test C2, not "test C1 -''o C2"' \ >> + $(_prohibit_regexp) > > I actually wrote a separate target before I saw you'd done it. Seeing > yours, I realize that both tests do belong in the same rule, but would > prefer the efficiency of combining the searches, so that we don't make > two passes through all sources, when one will do. Then the only trick is > to produce a combined diagnostic. Maybe like this (thought the resulting > line is too long -- for a diagnostic it's not a big deal). Agreed, since the diagnostic never prints on a successful run :) > > _m1 = use "test C1 && test C2, not "test C1 -''a C2" > _m2 = use "test C1 || test C2, not "test C1 -''o C2" > > sc_prohibit_test_minus_ao: > @re='\<test .+ -[ao] ' \ > msg='$(_m1); $(_m2)' \ > $(_prohibit_regexp) I like this change. ACK to your tweaks to my patch, and looking forward to the push. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list