[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: |
Robert Boehne |
Subject: |
Re: Dynamic package version numbers with Autoconf and Automake |
Date: |
Wed, 15 Aug 2012 11:58:46 -0500 |
User-agent: |
Mozilla/5.0 (X11; SunOS i86pc; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 08/15/12 08:45, Bob Friesenhahn wrote:
On Wed, 15 Aug 2012, Miles Bader wrote:
(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.
Likewise, GraphicsMagick configures a "version.h" as well as a version
file used for non-autotools builds under Windows. With the currently
used mechanism, only the few files depending on version.h need to be
rebuilt but the whole project relinks.
If the project "config.h" was to be re-generated (seems to be
necessary with new AC_INIT), then all of the source modules would need
to be recompiled and relinked since everything depends on the
configuration header.
Bpb
I've had a similar complaint when using Autotest. In my project, the
test suite depends on an M4 input file that has the project version
encoded in it.
cat test_suite/package.m4
# Signature of the current package.
m4_define([AT_PACKAGE_NAME], [my_server])
m4_define([AT_PACKAGE_TARNAME], [my_server])
m4_define([AT_PACKAGE_MINOR_VERSION], 4.18)
m4_define([AT_PACKAGE_VERSION], [4.18.5])
m4_define([AT_PACKAGE_STRING], [my_server 4.18.5])
Which is created by a makefile rule as suggested in the autoconf
documentation:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Making-testsuite-Scripts
So when I change the version of the package, I autoreconf, then make
then autoreconf again.
Scenario #2 -
I have inherited a library versioning scheme that doesn't play nice with
Libtool (an absolute requirement)
when the Automake name is not encoded with the version -
lib_LTLIBRARIES = libmy_server-4.18.la
So every time I change the version argument to AC_INIT, I have to
search around my makefiles for anything
that references each library and make the same changes there.
So I would be very interested in a solution to these issues.
Cheers,
Robert