[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic package version numbers with Autoconf and Automake
From: |
Miles Bader |
Subject: |
Re: Dynamic package version numbers with Autoconf and Automake |
Date: |
Wed, 15 Aug 2012 13:13:21 +0900 |
Stefano Lattarini <address@hidden> writes:
> Actually, it depends. Where and why do you use such
> dynamically-computed version number in exactly?
That seems the real question.
My own method is to have:
(1) The "primary" version number is based on VCS info (this is
obviously unavailable for source trees not based on a VCS
checkout).
(2) The "autoconf" version number (in AC_INIT) is used as a
backup/default only when VCS info is unavailable. This number is
relatively static, and typically only updated after a release.
(3) The final version info is updated (using VCS info and/or autoconf
version info) at make time using a script, and when it changes,
only causes a source file (e.g., version.c) to change.
This means that although some things are rebuilt after a commit
(version.o, and relinking of any binaries that use it), the amount
of rebuilding is relatively minor while still yielding accurate
info.
-miles
--
Non-combatant, n. A dead Quaker.