Hello Michael,

Michel Briand wrote:
Peter Johansson <[EMAIL PROTECTED]> - Wed, 27 Aug 2008 10:50:48 -0400

Michel Briand wrote:
::::::::::::::
src/lib/Makefile.am
::::::::::::::
# Library: libtraining
# Generates its own pkg-config definition file

AM_CPPFLAGS = -DLIBRARY_VERSION=\"$(LIBRARY_VERSION)\"
Why not put
 AC_DEFINE([LIBRARY_VERSION], ...)

in configure.ac, so you don't need the above?  Of course you may want to
use a less generic name, e.g. TRAINING_LIBRARY_VERSION.

Similar applies to -DPROGRAM_VERSION in src/bin/Makefile.am.

OK. That's a lot more concise. But having done this:

# Step 1: extract version number from a source file
TRAINING_PROGRAM_VERSION=`cat PROGRAM_VERSION`
Why do you keep that info in a separate file; why not just:

TRAINING_PROGRAM_VERSION=1.0


Because program will evolve, hopefully, independently from the build
system. And as such, the program's version is independent from
configure.ac... So it should be stored in a separate file.
But you are still setting VERSION in AC_INIT, aren't you? And if so I don't see the point trying to keep VERSION partially independent from configure.ac.

Cheers,
Peter


Reply via email to