From: Stefano Lattarini Date: Thu, 13 Dec 2012 19:55:17 +0000 (+0100) Subject: maint: more files excluded in 'update-copyright' X-Git-Tag: v1.12.6~14 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a3cf9a8be30df65b916da31e014963261c35db23;p=thirdparty%2Fautomake.git maint: more files excluded in 'update-copyright' 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 --- diff --git a/Makefile.am b/Makefile.am index 89d747f7d..c800b9e30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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/$@