maint: more files excluded in 'update-copyright'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 13 Dec 2012 19:55:17 +0000 (20:55 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 13 Dec 2012 19:55:34 +0000 (20:55 +0100)
This will avoid the following spurious warnings when
"make update-copyright" is run:

    .autom4te.cfg: warning: copyright statement not found
    .git-log-fix: warning: copyright statement not found
    .gitattributes: warning: copyright statement not found
    .gitignore: warning: copyright statement not found
    AUTHORS: warning: copyright statement not found
    THANKS: warning: copyright statement not found
    contrib/README: warning: copyright statement not found
    contrib/multilib/README: warning: copyright statement not found
    doc/amhello/README: warning: copyright statement not found
    lib/install-sh: warning: copyright statement not found
    lib/mkinstalldirs: warning: copyright statement not found
    m4/acdir/README: warning: copyright statement not found
    t/README: warning: copyright statement not found

* Makefile.am (files_without_copyright): New.
(update-copyright): Use it when computing '$exclude_list'.
Also, skip any README file.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am

index 89d747f..c800b9e 100644 (file)
@@ -1038,6 +1038,26 @@ update_copyright_env = \
   UPDATE_COPYRIGHT_FORCE=1 \
   UPDATE_COPYRIGHT_USE_INTERVALS=2
 
+# In addition to the several README files, these as well are
+# not expected to have a copyright notice.
+files_without_copyright = \
+  .autom4te.cfg \
+  .git-log-fix \
+  .gitattributes \
+  .gitignore \
+  INSTALL \
+  COPYING \
+  AUTHORS \
+  THANKS \
+  lib/INSTALL \
+  lib/COPYING
+
+# This script is in the public domain.
+files_without_copyright += lib/mkinstalldirs
+
+# This script has an MIT-style license
+files_without_copyright += lib/install-sh
+
 .PHONY: update-copyright
 update-copyright:
        $(AM_V_GEN)set -e; \
@@ -1045,11 +1065,12 @@ update-copyright:
          || { echo "$@: cannot get current year" >&2; exit 1; }; \
        sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
          bootstrap.sh configure.ac; \
-       excluded_re=`\
+       excluded_re=`\
          for url in $(FETCHFILES); do echo "$$url"; done \
            | sed -e 's!^.*/!!' -e 's!^.*=!!' -e 's!^!lib/!' \
-           | sed -e '$$!s,$$,|,' | tr -d '\012\015'`; \
+         && for f in $(files_without_copyright); do echo $$f; done \
+       ) | sed -e '$$!s,$$,|,' | tr -d '\012\015'`; \
        $(GIT) ls-files \
-         | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \
+         | grep -Ev '(^|/)README$$' \
          | grep -Ev "^($$excluded_re)$$" \
          | $(update_copyright_env) xargs $(srcdir)/lib/$@