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