automake
[Top][All Lists]
Advanced

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

Re: [automake] Dependency question with _LDADD


From: Peter Johansson
Subject: Re: [automake] Dependency question with _LDADD
Date: Fri, 26 Sep 2008 16:29:47 -0400
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Hello Michael,

Michel Briand wrote:
Peter Johansson <address@hidden> - 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

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