diff options
author | Jim Meyering <jim@meyering.net> | 2002-01-19 00:12:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-01-19 00:12:30 +0000 |
commit | 325addae1dc5177c831909335dd6a0fe5fcfb14f (patch) | |
tree | 52d6197553460694ee8ce104a094af2c9de949e2 | |
parent | 4e692041797e749d5db74520ab0b0ef76827562e (diff) | |
download | coreutils-325addae1dc5177c831909335dd6a0fe5fcfb14f.tar.xz |
Ensure that the two version numbers in configure.ac remain in sync.
(local-check): Depend on ac-check.
(ac_p_pkg, AC_INIT_PKG): Define.
(ac_p_ver, AC_INIT_VER): Define.
(ac-check): New rule.
-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 \ |