Joel E. Denny wrote: > On Thu, 6 Aug 2009, Jim Meyering wrote: > >> Joel E. Denny wrote: >> > For Bison, update-copyright is not enough. Our backend skeletons contain >> > m4 macro invocations with lists of copyright years as arguments. I've a >> > written a script and a makefile target to handle these, but I would like >> > it to be called by maint.mk's update-copyright target rule so we don't >> > forget it. What's the best way to implement an extension like this? >> >> Put the rule in bison's cfg.mk, and make its name start with "sc_". >> It will then be run automatically via "make syntax-check". > > I was hoping it would be run by update-copyright. What about the > following patch?
Heh. Let's write my bogus suggestion off to morning caffeine deficiency. How about this instead? >From 0ec4fb7d6c2533eb4bb588f64616dd9c6883bcb4 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Thu, 6 Aug 2009 09:25:05 +0200 Subject: [PATCH] maint.mk: support update-copyright-local * top/maint.mk (update-copyright-local): Define place-holder. (update-copyright): Depend on $(update-copyright-local). --- ChangeLog | 6 ++++++ top/maint.mk | 6 +++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5a6a10..b788cc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-06 Jim Meyering <[email protected]> + + maint.mk: support update-copyright-local + * top/maint.mk (update-copyright-local): Define place-holder. + (update-copyright): Depend on $(update-copyright-local). + 2009-08-05 Joel E. Denny <[email protected]> update-copyright: support C-style comments diff --git a/top/maint.mk b/top/maint.mk index 2df7c04..a4ce064 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -772,11 +772,15 @@ 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 ?= + # 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$$ .PHONY: update-copyright -update-copyright: +update-copyright: $(update-copyright-local) grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \ | grep -v -E '$(update-copyright-exclude-regexp)' \ | xargs $(build_aux)/$@ -- 1.6.4.70.g9c084
