From: Eric Blake Date: Fri, 14 Aug 2009 15:40:53 +0000 (-0600) Subject: maint.mk: simplify update-copyright rule X-Git-Tag: v0.1~5651 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=284c3066bb305ced359bdc5df7095a53c71f619a;p=gnulib.git maint.mk: simplify update-copyright rule * top/maint.mk (update-copyright-local): Delete, and document how to do it in cfg.mk instead. (update-copyright-exclude-regexp): Delete, and document how to do it in .x-update-copyright instead. (update-copyright): Simplify, thanks to VC_LIST_EXCEPT. Don't exclude ChangeLog. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 7c47443fc..ebcee4119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-08-14 Eric Blake + + maint.mk: simplify update-copyright rule + * top/maint.mk (update-copyright-local): Delete, and document how + to do it in cfg.mk instead. + (update-copyright-exclude-regexp): Delete, and document how to do + it in .x-update-copyright instead. + (update-copyright): Simplify, thanks to VC_LIST_EXCEPT. Don't + exclude ChangeLog. + 2009-08-14 Bruno Haible * m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit. diff --git a/top/maint.mk b/top/maint.mk index 5d7c45e66..3f9c8ff7e 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -772,19 +772,19 @@ INDENT_SOURCES ?= $(C_SOURCES) indent: indent $(INDENT_SOURCES) -# If you have an additional project-specific rule, -# define it in cfg.mk and set this variable to its name. -update-copyright-local ?= - # If you want to set UPDATE_COPYRIGHT_* environment variables, # put the assignments in this variable. update-copyright-env ?= # Run this rule once per year (usually early in January) # to update all FSF copyright year lists in your project. -update-copyright-exclude-regexp ?= (^|/)COPYING$$ +# If you have an additional project-specific rule, +# add it in cfg.mk along with a line 'update-copyright: prereq'. +# By default, exclude all variants of COPYING; you can also +# add exemptions (such as ChangeLog..* for rotated change logs) +# in the file .x-update-copyright. .PHONY: update-copyright -update-copyright: $(update-copyright-local) +update-copyright: 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)/$@