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


Reply via email to