summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.am13
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1973ae5..1070e57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-11 Jim Meyering <jim@meyering.net>
+
+ Ensure that idutils.el's "Version:" comment stays up to date.
+ * Makefile.am (distcheck-hook): New rule.
+
2007-07-10 Tom Tromey <tromey@redhat.com>
Adjust idutils.el comments to work with package.el.
diff --git a/Makefile.am b/Makefile.am
index 7839bcf..ef6afb7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,4 +4,15 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = m4 intl lib libidu src lisp doc testsuite po
EXTRA_DIST = README-alpha config.rpath mkinstalldirs autogen.sh
-
+# When the version number is composed of only digits and "."s,
+# ensure that it matches the "Version:" comment in idutils.el.
+f = $(srcdir)/lisp/idutils.el
+distcheck-hook:
+ case "$(VERSION)" in *[^.0-9]*) chk=n;; *) chk=y;; esac; \
+ if test $$chk = y; then \
+ v=`echo "$(VERSION)" | sed 's/\./\\\\./'`; \
+ grep '^;; Version: '"$$v"'$$' $(f) > /dev/null && : \
+ || { echo 1>&2 $(f): update version to $(VERSION);exit 1; } \
+ else \
+ :; \
+ fi