automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting $VERSION at runtime


From: Bruce Korb
Subject: Re: setting $VERSION at runtime
Date: Tue, 24 Jan 2006 09:21:15 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Hi Brian/Ralf,

Ralf Wildenhues wrote:

If you're ultimately out to set the AC_INIT version argument, you may
want to read this thread (completely!)
http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/6129 esp.
http://article.gmane.org/gmane.comp.sysutils.autoconf.general/6169
and then decide for yourself whether that's what you need.

OTOH, some may consider that too convoluted and esoteric for mere humans.
Simply write a bootstrap script that computes version information and
spreads it around wherever you want it.  You want to try to keep tool
usage as reasonably simple as possible, and all that normalizing, tracing,
sedding, grepping, awking, et al. does not exactly qualify as "simplifying
the process", even if the the actual number of source text characters
happens to be fewer.  Using bootstrap scripts and the script itself should
both be very straight forward.  e.g.:

#! /bin/sh
sharutils_version=4.6.1-pre6

autoconf_version=`
  autoconf --version | \
    sed -e 's/autoconf.*) *//' -e '1q'`

gettext_version=`
  gettext --version | \
    sed -e 's/^gettext .*) *//' -e '1q'`

exec 3> version.m4
cat >&3 <<-  _EOVers_
        m4_define([sharutils_version], [${sharutils_version}])
        m4_define([sharutils_eaddr],   address@hidden)
        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>&-

cat > doc/version.texi <<- _EOVersion_
        @c Do not edit thie file
        @c This is generated by the bootstrap script

        @set UPDATED `date +'%d %B %Y'`
        @set UPDATED-MONTH `date +'%B %Y'`
        @set EDITION ${sharutils_version}
        @set VERSION ${sharutils_version}
        _EOVersion_




reply via email to

[Prev in Thread] Current Thread [Next in Thread]