automake
[Top][All Lists]
Advanced

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

Re: Trying to improve our dependency tracking


From: Ralf Wildenhues
Subject: Re: Trying to improve our dependency tracking
Date: Tue, 6 May 2008 05:24:51 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello James,

* James Willenbring wrote on Thu, May 01, 2008 at 10:51:11PM CEST:
> When I add
> 
> myexe_DEPENDENCIES = $(PACKAGEA_DEPENDENCIES)
> 
> $(PACKAGEA_DEPENDENCIES) is not resolved before dependencies are checked.
> Despite the fact that I put the include directive at the top of the
> Makefile.am, it shows up at the bottom of the Makefile.  If I manually move
> the include directive higher in the makefile (but below the definition of
> top_builddir), everything works as I would hope.

Can you show an example Makefile.am plus configure.ac that exposes this
problem?

> Does anyone have any suggestions for fixing this problem or for a different
> approach I should take for dependency tracking?

In general, I try to let automake compute dependencies as much as
possible.  For example, it cannot "see" the dependency with this:

-- snip libb/configure.ac --
AC_SUBST([LIBA], [../liba/liba.la])

-- snip libb/Makefile.am --
libb_la_LIBADD = $(LIBA)
# next line needed because automake cannot see through substitution
libb_la_DEPENDENCIES = $(LIBA)


OTOH, it *can* compute the dependency with conditionals:

-- snip libb/configure.ac --
AM_CONDITIONAL([NEED_LIBA], [test -n "$need_liba"])

-- snip libb/Makefile.am --
if NEED_LIBA
libb_la_LIBADD += ../liba/liba.la
endif
# No *_DEPENDENCIES needed in this example.


Hope that helps.

Cheers,
Ralf




reply via email to

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