configure.in: use GNUCASH_VERSION in AC_INIT

Christian Stimming stimming at tuhh.de
Wed Oct 26 16:07:48 EDT 2005


Well, now I know why this is done. The autoconf guys for whatever reason 
decided that your favorite package is supposed to write the version string as 
a literal in the AC_INIT call, second argument. In particular, it is *not* 
allowed to use shell substitutions there, which was the original way of 
composing GNUCASH_VERSION. (It is allowed to use m4 substitutions, but we 
better leave that alone.)

This is about the most stupid design decision I have seen in the recent 
history of the autotools. (Although there might be some other as well...) 
They assume that we would be happy with a hard-coded multi-part version 
number string. For whatever reason they think we would never need the 
individual numbers from that string, or if we did, we would happily extract 
these from the PACKAGE_VERSION variable. Well, thank you. 

The only way out here is to use the officially deprecated version of AC_INIT 
without any arguments, and set the version number in AM_INIT_AUTOMAKE. I 
guess this is still much better than the current way, so I'll commit that to 
the gnome2-branch.

Christian


Am Dienstag, 18. Oktober 2005 15:53 schrieb Derek Atkins:
> Honestly, I don't know why Jan did that.  I have no objection
> to switching it back to the other way.
>
> Jan, if you're reading this -- is there a reason you did it this way?
>
> -derek
>
> Quoting Christian Stimming <stimming at tuhh.de>:
> > Dear Derek,
> >
> > in the other CVS branches we define the version-string of gnucash via
> > GNUCASH_VERSION=$GNUCASH_MAJOR_VERSION.$GNUCASH_MINOR_VERSION.$GNUCASH_MI
> >CRO_VERSION and use this variable in AC_INIT. This is IMHO a quite
> > convenient way to define the version number and to ensure that it is
> > consistent between the build system and also in the program itself. (As
> > another positive side-effect this would make automated version number
> > changes even easier...)
> >
> > In gnucash-gnome2-dev branch this was changed into a hard-coded value
> > in AC_INIT. That change was a patch submitted by Jan Petersen and
> > committed by you:
> >
> > Sat Jun 14 19:26:10 2003 UTC by warlord
> > Patch from Jan Petersen
> > https://cvs.gnucash.org/cgi-bin/cvsweb.cgi/gnucash/configure.in#rev1.359.
> >2.14
> > https://cvs.gnucash.org/cgi-bin/cvsweb.cgi/gnucash/configure.in.diff?r1=1
> >.359.2.13;r2=1.359.2.14


More information about the gnucash-devel mailing list