Eric Blake wrote: > Jim Meyering <jim <at> meyering.net> writes: >> +# If you have an additional project-specific rule, >> +# define it in cfg.mk and set this variable to its name. >> +update-copyright-local ?= >> + >> .PHONY: update-copyright >> -update-copyright: >> +update-copyright: $(update-copyright-local) > > I'm wondering if making this a user-overridable variable is a bit overkill. > After all, GNU make dependencies are additive (as long as only one rule > exists), such that: > > maint.mk > ======== > foo: > rule > > cfg.mk > ====== > foo: prereq > > works to run prereq before rule during 'make foo'. > >> # 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$$ > ... >> grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \ >> | grep -v -E '$(update-copyright-exclude-regexp)' \ > > Hmm. VC_LIST_EXCEPT excludes ChangeLog by default, but this is one case where > we WANT ChangeLog's copyright updated along with everything else. Also, I > think we should be exempting all forms of COPYING (such as COPYING.LIB). And > the use of .x-update-copyright seems cleaner than trying to write a sane > regexp > replacement in update-copyright-exclude-regexp (after all, I just got that > wrong in autoconf[1]). Would it be better to just do the following patch? > > [1] > http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/6772/focus=6773
Yes. Good ideas, all. Thanks. > From: Eric Blake <[email protected]> > Date: Fri, 14 Aug 2009 09:40:53 -0600 > Subject: [PATCH] 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.
