Eric Blake <[email protected]> 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?

/Simon

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