diff --git a/Makefile.am b/Makefile.am index 47f03f8..bf9bd01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,11 +22,11 @@ jabber-time.el jabber-truncate.el jabber-util.el \ jabber-vcard-avatars.el jabber-vcard.el jabber-version.el \ jabber-watch.el jabber-widget.el jabber-wmii.el jabber-xmessage.el \ jabber-muc-nick-coloring.el \ -jabber-xml.el jabber.el srv.el jabber-tmux.el +jabber-xml.el jabber.el srv.el jabber-tmux.el jabber-ourversion.el compat_lisp_sources = jabber-fallback-lib/hexrgb.el -dist_lisp_LISP=$(my_lisp_sources) $(compat_lisp_sources) jabber-autoloads.el jabber-ourversion.el +dist_lisp_LISP=$(my_lisp_sources) $(compat_lisp_sources) jabber-autoloads.el MAINTAINERCLEANFILES=jabber-autoloads.el EXTRA_DIST = jabber-pkg.el.in diff --git a/configure.ac b/configure.ac index b97e7b1..bc7d3b7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,14 @@ -AC_INIT([jabber.el], [0.8.92], [emacs-jabber-general@lists.sourceforge.net], [emacs-jabber]) +AC_INIT([jabber.el], + m4_esyscmd_s([sed -ne 's/^(defconst jabber-version "\(.*\)"$/\1/p' jabber-ourversion.el]), + [emacs-jabber-general@lists.sourceforge.net], + [emacs-jabber]) AC_CONFIG_AUX_DIR([build-aux]) dnl Need automake 1.11 for dist-xz option AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign dist-bzip2 dist-xz dist-zip]) AC_CONFIG_MACRO_DIR([m4]) +AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/jabber-ourversion.el']) + AM_PATH_LISPDIR AS_IF([test "$EMACS" = no], [AC_MSG_ERROR([cannot find Emacs])]) @@ -14,5 +19,5 @@ AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, false) m4_ifndef([AM_GCONF_SOURCE_2], [m4_defun([AM_GCONF_SOURCE_2])]) AM_GCONF_SOURCE_2 -AC_CONFIG_FILES([Makefile tests/Makefile gconf/Makefile jabber-ourversion.el]) +AC_CONFIG_FILES([Makefile tests/Makefile gconf/Makefile]) AC_OUTPUT diff --git a/jabber-ourversion.el b/jabber-ourversion.el new file mode 100644 index 0000000..b722cc4 --- /dev/null +++ b/jabber-ourversion.el @@ -0,0 +1,8 @@ +;; jabber-ourversion.el. Holds the version number in a format that +;; configure.ac can read. + +;; On the following line, only change the part between double quotes: +(defconst jabber-version "0.8.92" + "version returned to those who query us") + +(provide 'jabber-ourversion) diff --git a/jabber-ourversion.el.in b/jabber-ourversion.el.in deleted file mode 100644 index 742e50c..0000000 --- a/jabber-ourversion.el.in +++ /dev/null @@ -1,7 +0,0 @@ -;; @configure_input@ - -;; This value gets updated automatically when configure.ac is changed. -(defconst jabber-version "@PACKAGE_VERSION@" - "version returned to those who query us") - -(provide 'jabber-ourversion)