Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-25 Thread Eric Blake
According to jema...@gnu.org on 2/25/2010 4:26 PM: > I heavily expanded the _prohibit_regexp macro to accept more arguments > and renamed it to _sc_search_regexp. Using the new parameters it is > possible to write rules like: > > # Ensure that each .c file containing a "main" function also > # ca

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-25 Thread jemarch
> I suggest to use the following solution that works properly in all > cases while avoiding the code duplication (in the spirit of > _prohibit_regexp): Good idea. I heavily expanded the _prohibit_regexp macro to accept more arguments and renamed it to _sc_search_regexp. Using the ne

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread jemarch
> define _sc_maybe_matching_files > dummy=; : so we do not need a semicolon before each use; \ > test "x$$re" != x || { echo '$(ME): re not defined' 1>&2; exit 1; }; \ > if test -n "$$matching"; then matching='yes'; fi\ > files=$$($(VC_LIST_EXCEPT) | grep

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread Jim Meyering
jema...@gnu.org wrote: ... > I suggest to use the following solution that works properly in all > cases while avoiding the code duplication (in the spirit of > _prohibit_regexp): Good idea. > define _sc_maybe_matching_files > dummy=; : so we do not need a semicolon before each use;

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread Pádraig Brady
On 22/02/10 15:08, jema...@gnu.org wrote: Would it be better to just add /dev/null as a parameter to grep? I.E. like: @grep -nE 'error \(EXIT_SUCCESS,' \ $$($(VC_LIST_EXCEPT) /dev/null | grep -E '\.[chly]$$')&& \

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread jemarch
Would it be better to just add /dev/null as a parameter to grep? I.E. like: @grep -nE 'error \(EXIT_SUCCESS,'\ $$($(VC_LIST_EXCEPT) /dev/null | grep -E '\.[chly]$$')&& \ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread Eric Blake
According to Pádraig Brady on 2/22/2010 6:40 AM: > On 21/02/10 13:43, jema...@gnu.org wrote: >> >> Hi. >> >> Just another little patch to avoid some of the sc_* rules to freeze if >> the filtering of VC_LIST_EXCEPT gives an empty string (for example, >> 'make sc_error_exit_success' freezes if there

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread Jim Meyering
Pádraig Brady wrote: ... > Would it be better to just add /dev/null as a parameter to grep? > I.E. like: > > @grep -nE 'error \(EXIT_SUCCESS,' \ > $$($(VC_LIST_EXCEPT) /dev/null | grep -E '\.[chly]$$')&&\ > { echo '$(ME): found error (EXIT_S

Re: [patch] Avoid some of the sc_ rules to freeze

2010-02-22 Thread Pádraig Brady
On 21/02/10 13:43, jema...@gnu.org wrote: Hi. Just another little patch to avoid some of the sc_* rules to freeze if the filtering of VC_LIST_EXCEPT gives an empty string (for example, 'make sc_error_exit_success' freezes if there are not source files in ${srcdir}/). I found this problem due t

[patch] Avoid some of the sc_ rules to freeze

2010-02-21 Thread jemarch
Hi. Just another little patch to avoid some of the sc_* rules to freeze if the filtering of VC_LIST_EXCEPT gives an empty string (for example, 'make sc_error_exit_success' freezes if there are not source files in ${srcdir}/). I found this problem due to the bazaar issue in vc-list-files. 2010-