X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=366d12ab44427789974cbb15176a1fd0374055a6;hb=f20e1d7e0186c6f1517fb6babd446adf066683ce;hp=084a1779901f66488b95f7f488a77b275a05bd1a;hpb=c4b45631bce0034e4433a9f421cf16fe803c51f3;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 084a17799..366d12ab4 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -36,9 +36,14 @@ VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) +# You can override this variable in cfg.mk to set your own regexp +# matching files to ignore. +VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ + VC_LIST_EXCEPT = \ $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ - else grep -Ev "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi + else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ + | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version @@ -495,6 +500,13 @@ sc_GPL_version: @re='either ''version [^3]' msg='GPL vN, N!=3' \ $(_prohibit_regexp) +# Require the latest GFDL. Two regexp, since some .texi files end up +# line wrapping between 'Free Documentation License,' and 'Version'. +_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any) +sc_GFDL_version: + @re='$(_GFDL_regexp)' msg='GFDL vN, N!=3' \ + $(_prohibit_regexp) + cvs_keywords = \ Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State @@ -517,14 +529,20 @@ sc_prohibit_S_IS_definition: msg='do not define S_IS* macros; include ' \ $(_prohibit_regexp) -# Each program that uses proper_name_utf8 must link with -# one of the ICONV libraries. +# Each program that uses proper_name_utf8 must link with one of the +# ICONV libraries. Otherwise, some ICONV library must appear in LDADD. +# The perl -0777 invocation below extracts the possibly-multi-line +# definition of LDADD from the appropriate Makefile.am and exits 0 +# when it contains "ICONV". sc_proper_name_utf8_requires_ICONV: @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\ if test "x$$progs" != x; then \ fail=0; \ for p in $$progs; do \ dir=$$(dirname "$$p"); \ + perl -0777 \ + -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \ + $$dir/Makefile.am && continue; \ base=$$(basename "$$p" .c); \ grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \ @@ -573,8 +591,12 @@ update-NEWS-hash: NEWS # to emit a definition for each substituted variable. # We use perl rather than "grep -nE ..." to exempt a single # use of an @...@-delimited variable name in src/Makefile.am. -sc_makefile_check: - @perl -ne '/\@[A-Z_0-9]+\@/ && !/^cu_install_program =/' \ +# Allow the package to add exceptions via a hook in cfg.mk; +# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by +# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. +_makefile_at_at_check_exceptions ?= +sc_makefile_at_at_check: + @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :