[Top][All Lists]

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

update-copyright make rule?

From: Simon Josefsson
Subject: update-copyright make rule?
Date: Mon, 03 Aug 2009 15:57:08 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

In build-aux/update-copyright it says:

# You may wish to place a target like the following in your top-level
# makefile in your project:
#   .PHONY: update-copyright
#   update-copyright:
#       if test -d .git; then                                   \
#         git grep -l -w Copyright                              \
#           | grep -v -E '(^|/)(COPYING|ChangeLog)'             \
#           | xargs $(srcdir)/build-aux/$@;                     \
#       fi

I'd rather not have to manually add this snippet to 5+ projects, and
keep it synchronized in case of changes.

How about adding the rule to maintainer-makefile?  The rule above is
git-specific, but that can easily be solved by just renaming the rule
update-git-copyright if it is deemed a significant problem (see below).


diff --git a/top/maint.mk b/top/maint.mk
index c3e2f47..bd98803 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -730,6 +730,15 @@ web-manual:
            "$(PACKAGE_NAME) - $(manual_title)"
        @echo " *** Upload the doc/manual directory to web-cvs."
+# Update copyright
+.PHONY: update-git-copyright
+    if test -d .git; then                              \
+      git grep -l -w Copyright                         \
+        | grep -v -E '(^|/)(COPYING|ChangeLog)'                \
+        | xargs $(build_aux)/update-copyright;         \
+    fi
 # Code Coverage

reply via email to

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