bug-gnulib
[Top][All Lists]
Advanced

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

Re: maintainer-makefile vs vc-list-files/useless-if-before-free


From: Jim Meyering
Subject: Re: maintainer-makefile vs vc-list-files/useless-if-before-free
Date: Mon, 27 Apr 2009 15:17:24 +0200

Simon Josefsson wrote:
> Eric Blake <address@hidden> writes:
>> According to Simon Josefsson on 4/27/2009 6:33 AM:
>>>> checkout), but your arguments for the second camp (bootstrap is
>>>> independent of gnulib) are good, so how about this patch instead?
>>>
>>> That works for me.
>>
>> Pushed.
>
> Works fine in several of my projects now, thanks.  A minor nit, it seems
> the script finds the script itself...
>
> avoid_if_before_free
> build-aux/useless-if-before-free: if (p) free (p)
> build-aux/useless-if-before-free: if (p != NULL) free (p)
> build-aux/useless-if-before-free: if (NULL != p) free (p)
> build-aux/useless-if-before-free: if (p) free (p)
> maint.mk: found useless "if" before "free" above
> make: *** [sc_avoid_if_before_free] Error 1
>
> How about the patch below?

Yes, please.
This is required for those projects that version-control
files imported from gnulib.

> diff --git a/top/maint.mk b/top/maint.mk
> index 229b0dc..de9ba4f 100644
> --- a/top/maint.mk
> +++ b/top/maint.mk
> @@ -113,7 +113,7 @@ endef
>  sc_avoid_if_before_free:
>       @$(srcdir)/build-aux/useless-if-before-free                     \
>               $(useless_free_options)                                 \
> -         $$($(VC_LIST_EXCEPT)) &&                                    \
> +         $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free ) &&  \
>         { echo '$(ME): found useless "if" before "free" above' 1>&2;  \
>           exit 1; } || :
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]