X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=315b22317e5a2dab8ad583d009ae4e7c7583111e;hb=e53e23a012113952499a70115d2ca26b2a33e2bf;hp=644fbb6485f697627691a53b983d00031518f5c6;hpb=8b4add2c64d10b260c21352768e22d41dc9d2ff7;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 644fbb648..315b22317 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -103,6 +103,12 @@ endif # Override this in cfg.mk if you are using a different format in your # NEWS file. today = $(shell date +%Y-%m-%d) + +# Select which lines of NEWS are searched for $(news-check-regexp). +# This is a sed line number spec. The default says that we search +# lines 1..10 of NEWS for $(news-check-regexp). +# If you want to search only line 3 or only lines 20-22, use "3" or "20,22". +news-check-lines-spec ?= 1,10 news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' # Prevent programs like 'sort' from considering distinct strings to be equal. @@ -584,10 +590,19 @@ sc_changelog: sc_program_name: @require='set_program_name *\(m?argv\[0\]\);' \ in_vc_files='\.c$$' \ - containing='^main *(' \ + containing='\
' \ - halt='do not test the above HAVE_
_H symbol(s);\n'\ -' with the corresponding gnulib module, they are always true' \ + halt=$$(printf '%s\n' \ + 'do not test the above HAVE_
_H symbol(s);' \ + ' with the corresponding gnulib module, they are always true') \ $(_sc_search_regexp) # ================================================================== @@ -725,7 +741,8 @@ sc_GFDL_version: halt='GFDL vN, N!=3' \ $(_sc_search_regexp) -# Don't use Texinfo @acronym{} as it is not a good idea. +# Don't use Texinfo's @acronym{}. +# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$ sc_texinfo_acronym: @prohibit='@acronym\{' \ @@ -801,6 +818,13 @@ sc_prohibit_test_minus_ao: halt='$(_ptm1); $(_ptm2)' \ $(_sc_search_regexp) +# Avoid a test bashism. +sc_prohibit_test_double_equal: + @prohibit='(\&2; exit 1; } || : news-check: NEWS - if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \ - >/dev/null; then \ + if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \ + | grep -E $(news-check-regexp) >/dev/null; then \ :; \ else \ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ @@ -948,7 +972,7 @@ writable-files: test "$$fail" && exit 1 || : ; \ fi -v_etc_file = lib/version-etc.c +v_etc_file = $(gnulib_dir)/lib/version-etc.c sample-test = tests/sample-test texi = doc/$(PACKAGE).texi # Make sure that the copyright date in $(v_etc_file) is up to date. @@ -1006,9 +1030,10 @@ sc_Wundef_boolean: sc_vulnerable_makefile_CVE-2009-4029: @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \ in_files=$$(find $(srcdir) -name Makefile.in) \ - halt='the above files are vulnerable; beware of running\n'\ -'"make dist*" rules, and upgrade to fixed automake\n'\ -'see http://bugzilla.redhat.com/542609 for details' \ + halt=$$(printf '%s\n' \ + 'the above files are vulnerable; beware of running' \ + ' "make dist*" rules, and upgrade to fixed automake' \ + ' see http://bugzilla.redhat.com/542609 for details') \ $(_sc_search_regexp) vc-diff-check: @@ -1073,7 +1098,6 @@ emit_upload_commands: @echo ===================================== @echo ===================================== -noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?] define emit-commit-log printf '%s\n' 'post-release administrivia' '' \ '* NEWS: Add header line for next release.' \ @@ -1111,6 +1135,7 @@ alpha beta stable: $(local-check) writable-files no-submodule-changes # Override this in cfg.mk if you follow different procedures. release-prep-hook ?= release-prep +gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?] .PHONY: release-prep release-prep: case $$RELEASE_TYPE in alpha|beta|stable) ;; \ @@ -1122,7 +1147,7 @@ release-prep: fi echo $(VERSION) > $(prev_version_file) $(MAKE) update-NEWS-hash - perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS + perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS $(emit-commit-log) > .ci-msg $(VC) commit -F .ci-msg -a rm .ci-msg