diff options
Diffstat (limited to 'Makefile.maint')
-rw-r--r-- | Makefile.maint | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile.maint b/Makefile.maint index 811e2a1cd..17bb2c0b8 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -53,7 +53,7 @@ release_archive_dir ?= ../release # Checks that don't require cvs. # Run `changelog-check' last, as previous test may reveal problems requiring # new ChangeLog entries. -local-check: po-check copyright-check writable-files \ +local-check: ac-check po-check copyright-check writable-files \ m4-check author_mark_check \ changelog-check @@ -70,6 +70,23 @@ m4-check: && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \ exit 1; } || : +# If the 3-arg form of AC_INIT is used, then verify that the package name +# and version number specified there match $(PACKAGE) and $(VERSION). +# e.g., AC_INIT(GNU fileutils, 4.1.6, bug-fileutils@gnu.org) + +ac_p_pkg = /^AC_INIT\((GNU )?(\S+),/ and print "$$2\n" +AC_INIT_PKG := $(shell perl -ne '$(ac_p_pkg)' configure.ac) +ac_p_ver = /^AC_INIT\(.*?, *(\S+),/ and print "$$1\n" +AC_INIT_VER := $(shell perl -ne '$(ac_p_ver)' configure.ac) + +ac-check: + if test "$(AC_INIT_PKG)"; then \ + test "$(AC_INIT_PKG)" = $(PACKAGE) || exit 1; \ + fi + if test "$(AC_INIT_VER)"; then \ + test "$(AC_INIT_VER)" = $(VERSION) || exit 1; \ + fi + # Verify that all source files using _() are listed in po/POTFILES.in. po-check: if test -f po/POTFILES.in; then \ |