bug-gnulib
[Top][All Lists]
Advanced

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

Re: update-copyright local hook


From: Jim Meyering
Subject: Re: update-copyright local hook
Date: Tue, 18 Aug 2009 21:06:00 +0200

Joel E. Denny wrote:

> Hi Eric and Jim.
>
> On Sat, 15 Aug 2009, Eric Blake wrote:
>
>> According to Jim Meyering on 8/15/2009 2:37 AM:
>> >> It changed a bit due to the merge; here's what I'm pushing.
>>
>> I haven't pushed yet, in case we decide something different...
>>
>> > ...
>> >>   grep -l -w Copyright $$($(VC_LIST_EXCEPT))              \
>> >> -   | grep -v -E '$(update-copyright-exclude-regexp)'     \
>> >> +         $(srcdir)/ChangeLog | grep -v COPYING           \
>> >>     | $(update-copyright-env) xargs $(build_aux)/$@
>
> Looks like any file whose name contains COPYING is always excluded, and
> the top-level ChangeLog is always included.  Projects cannot override
> either even when using .x-update-copyright.
>
>> About the only
>> way I can see to include all ChangeLog by default, but still honor the
>> file .x-update-copyright, is to inline the bulk of the VC_LIST_EXCEPT
>> macro directly in the update-copyright rule but without the ChangeLog
>> exception.
>
> What about the following patch?
>
>>From f72a12d221101f03b43d7be227fcf7550d0ba0d3 Mon Sep 17 00:00:00 2001
> From: Joel E. Denny <address@hidden>
> Date: Mon, 17 Aug 2009 21:41:57 -0400
> Subject: [PATCH] maint.mk: give full control over update-copyright exclusions

Thanks!
I've applied it with these changes:
  - split a long line
  - double-quote the new variable use
  - allow extended regular expressions

The quoting isn't important for the existing use
with a trivial regular expression, but in general, it is.

diff --git a/top/maint.mk b/top/maint.mk
index db41640..28a6da1 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -38,7 +38,8 @@ VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
 VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)

 VC_LIST_EXCEPT = \
-  $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; 
else grep -v $${VC_LIST_EXCEPT_DEFAULT-ChangeLog}; fi
+  $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
+              else grep -Ev "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi

 ifeq ($(origin prev_version_file), undefined)
   prev_version_file = $(srcdir)/.prev-version




reply via email to

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