Re: Dynamic package version numbers with Autoconf and Automake

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

 



Stefano Lattarini <stefano.lattarini@xxxxxxxxx> 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.

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux