X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=3651543267fe14d8158d5f74d1a13b680c64698f;hb=e8269e90e35140ebb75f39669d39bd021e364105;hp=40f306e7c37456d5a53bfd183269bc286ba71b62;hpb=735d9d0a10551cec9e67cc0eb0aadb541bc63d27;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 40f306e7c..365154326 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -495,6 +495,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 +524,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"; }; \ @@ -550,7 +563,8 @@ sc_const_long_option: NEWS_hash = \ $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ $(srcdir)/NEWS \ - | grep -v '^Copyright .*Free Software' \ + | perl -0777 -pe \ + 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ | md5sum - \ | sed 's/ .*//') @@ -572,8 +586,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; } || :