Alfred M. Szmidt wrote:
> Bruce, how about this?  I'd actually rather see the whole version.m4
> mess be removed, but this is a decent fix for now.

A good and proper define-in-one-place fix for version stamps
is a really good idea.  Sticking the original version string
into an AC_INIT() m4 macro is _not_ a good idea.  It needs
to be in a readily accessible place.  "version.m4" is a
derived file and creating a full, derived file seems better
than editing a version controlled file (configure.ac).
I did it for README, but doesn't mean I like it. ;)

For anyone not interesting in pulling the sharutils archive
and reading a bootstrap script, FYI it contains the original:
> sharutils_version=4.7.1
> 
> autoconf_version=$(
>   autoconf --version | \
>     sed -e 's/autoconf.*) *//' -e '1q'
> )
> gettext_version=$(
>   gettext --version | \
>     sed -e 's/^gettext .*) *//' -e '1q'
> )
> automake_version=$(
>   automake --version | \
>     sed -e 's/^automake .*) *//' -e 's/\([0-9]*\.[0-9]*\)\..*/\1/' -e 1q
> )
> exec 3> version.m4
> cat >&3 <<-  _EOVers_
>         m4_define([sharutils_version], [${sharutils_version}])
>         m4_define([sharutils_eaddr],   [bug-gnu-ut...@gnu.org])
>         m4_define([gettext_version],   [${gettext_version}])
>         AC_PREREQ([${autoconf_version}])
>         _EOVers_
> 
> case "${sharutils_version}" in
> *.*pre* ) echo [DIST_ALPHA=README-alpha] ;;
> *)      echo [DIST_ALPHA=] ;;
> esac >&3
> exec 3>&-

I'll add the following shortly.  Thanks again, Alfred:

> 2009-11-15  Alfred M. Szmidt  <a...@gnu.org>
> 
>       * configure.ac (AC_INIT): Wrap sharutils_version and
>       sharutils_eaddr around m4_defn.
>       (AM_INIT_AUTOMAKE): Added `gnits'.
> 

> ! AC_INIT([GNU 
> sharutils],m4_defn([sharutils_version]),m4_defn([sharutils_eaddr]))

I was about to ask of sharutils_eaddr needed an "m4_defn()" wrapper, too.


Reply via email to