[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: update-copyright local hook
From: |
Joel E. Denny |
Subject: |
Re: update-copyright local hook |
Date: |
Thu, 6 Aug 2009 03:06:33 -0400 (EDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
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?
>From 77358a91a3784d7fc43e827f5f37f5957e65b41d Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Thu, 6 Aug 2009 02:57:12 -0400
Subject: [PATCH] maint.mk: implement update-copyright-local
* top/maint.mk (update-copyright): If update-copyright-local
target rule is present in cfg.mk, make it a dependency.
---
ChangeLog | 6 ++++++
top/maint.mk | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c5a6a10..e3b637e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-06 Joel E. Denny <address@hidden>
+
+ maint.mk: implement update-copyright-local
+ * top/maint.mk (update-copyright): If update-copyright-local
+ target rule is present in cfg.mk, make it a dependency.
+
2009-08-05 Joel E. Denny <address@hidden>
update-copyright: support C-style comments
diff --git a/top/maint.mk b/top/maint.mk
index 2df7c04..2bcf730 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -775,8 +775,9 @@ indent:
# 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:
+.PHONY: update-copyright update-copyright-local
+update-copyright: \
+ $(shell sed -n 's/^\(update-copyright-local\):.*/\1/p' $(_cfg_mk))
grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \
| grep -v -E '$(update-copyright-exclude-regexp)' \
| xargs $(build_aux)/$@
--
1.5.4.3
- update-copyright local hook, Joel E. Denny, 2009/08/06
- Re: update-copyright local hook, Jim Meyering, 2009/08/06
- Re: update-copyright local hook,
Joel E. Denny <=
- Re: update-copyright local hook, Eric Blake, 2009/08/14
- Re: update-copyright local hook, Jim Meyering, 2009/08/14
- Re: update-copyright local hook, Eric Blake, 2009/08/14
- Re: update-copyright local hook, Jim Meyering, 2009/08/15
- Re: update-copyright local hook, Eric Blake, 2009/08/15
- Re: update-copyright local hook, Jim Meyering, 2009/08/15
- Re: update-copyright local hook, Eric Blake, 2009/08/15