automake
[Top][All Lists]
Advanced

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

--gnits, AC_INIT and VERSION


From: Robert Collins
Subject: --gnits, AC_INIT and VERSION
Date: Wed, 23 Sep 2009 18:03:42 +1000
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There was discussion about getting version numbers from VCS recently;
I've done a slightly different thing for a while now:
AC_DEFUN([SUBUNIT_MAJOR_VERSION], [0])
AC_DEFUN([SUBUNIT_MINOR_VERSION], [0])
AC_DEFUN([SUBUNIT_MICRO_VERSION], [2])
AC_DEFUN([SUBUNIT_VERSION],
[SUBUNIT_MAJOR_VERSION.SUBUNIT_MINOR_VERSION.SUBUNIT_MICRO_VERSION])
AC_PREREQ([2.59])
AC_INIT([subunit], [SUBUNIT_VERSION], [contact...])
AC_SUBST([SUBUNIT_MAJOR_VERSION]) ...

This works well, until gnits is added to AM_INIT_AUTOMAKE.

It looks like it expects a literal, not a macro in AC_INIT ?

It seems to me that for gnits to work with dynamic (whether from VCS or
otherwise) version numbers, it would need to actually get the expanded
form, or perhaps more sensibly provide a configure time check that the
version calculation *results* in a good version.

Something like:

all: am-version-check
.PHONY: am-version-check

am-version-check::
        <logic here>

- -Rob

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq51lsACgkQ42zgmrPGrq5moACcCOKo5fleZ2L7/q5IA3ChWLko
fcMAnjYikQhHp1AVTkA6UD0XjXnvjKV4
=lrJs
-----END PGP SIGNATURE-----




reply via email to

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