[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting LDADD in Makefile.am makes _DEPENDENCIES empty
From: |
Ralf Wildenhues |
Subject: |
Re: Setting LDADD in Makefile.am makes _DEPENDENCIES empty |
Date: |
Sat, 14 Jun 2008 08:36:09 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Navneet,
* Navneet Dalal wrote on Fri, Jun 13, 2008 at 09:13:48AM CEST:
> If my makefile.am looks as following, then it automatically generates
> mybinary_DEPEDENCIES and set it to ../lib/libutil.la
> bin_PROGRAMS = mybinary
> LDADD= ../lib//libutil.la
> mybinary_SOURCES = mybinary.cpp
>
> However if my makefile looks like
> bin_PROGRAMS = mybinary
> LDADD= @MY_LIBS@
> mybinary_SOURCES = mybinary.cpp
>
> where MY_LIBS is a variable defined as AC_SUBST(MY_LIBS) and set in
> configure.in, then mybinary_DEPEDENCIES is set as empty.
Correct. This is hinted at vaguely in
<http://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html>
The reason is that automake cannot see whether @SOME_SUBSTITUTION@ will
later contain stuff that is unsuitable to be listed as a prerequisite,
while with literal values, and $(VARIABLES) which are themselves given
literally in the Makefile.am, automake can pick those parts which are
suitable.
Hope that helps.
Cheers,
Ralf