Re: [PATCH] coccicheck: optionally batch spatch invocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 6, 2019 at 7:55 PM Jeff King <peff@xxxxxxxx> wrote:
> Here's what a patch might look like to implement "0". By still using
> xargs in the unlimited code path, it's not too bad. I dunno.
>
> ---
> diff --git a/Makefile b/Makefile
> index daba958b8f..0765a59b7a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2792,7 +2792,12 @@ endif
>
>  %.cocci.patch: %.cocci $(COCCI_SOURCES)
>         @echo '    ' SPATCH $<; \
> -       if ! echo $(COCCI_SOURCES) | xargs -n $(SPATCH_BATCH_SIZE) \
> +       if test $(SPATCH_BATCH_SIZE) = 0; then \
> +               limit=; \
> +       else \
> +               limit='-n $(SPATCH_BATCH_SIZE)'; \
> +       fi; \
> +       if ! echo $(COCCI_SOURCES) | xargs $$limit \
>                 $(SPATCH) --sp-file $< $(SPATCH_FLAGS) \
>                 >$@+ 2>$@.log; \
>         then \
>
> -Peff

This doesn't seem too complicated to me..



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux