automake
[Top][All Lists]
Advanced

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

Re: automake 1.7.1 hangs while processing Makefile.am


From: Alexandre Duret-Lutz
Subject: Re: automake 1.7.1 hangs while processing Makefile.am
Date: Tue, 03 Dec 2002 21:28:43 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu)

>>> "Jason" == Jason Jordan <address@hidden> writes:

[...]

 Jason> One thing I noticed is that if I remove either all of
 Jason> the 'if MODE_*' OR all of the 'if FORMAT_*' clauses,
 Jason> then automake doesn't hang.  I'm not sure whether that's
 Jason> helpful, but it was interesting.  :)

 Jason> Can anyone tell me if I am doing something wrong?  

Nothing, unfortunately.

Many of the Automake functions that deal with conditionals in
Automake rely on an aglorithm that compute all possible
combinations of conditionals involved in a variable definition
(a conditionals can be either TRUE or FALSE).  Each time you add
a conditional, Automake gets twice slower.  At some point it
gets too slow to be of any use.

Here Automake is just computing all the 2^17 combinations of
your MODE_* and FORMAT_* conditionals...

Recently there have been some work to improve the way
Conditionals are handled (in what will become Automake 1.8, do
not expect this in the 1.7.x branch).  This explosive algorithm
is still used in two places, but we have all the machinery to
get rid of it.  I hope this will improve things.


As a workaround I suggest you use _LDADD substitutions as
suggested in the `Conditional Sources' section of the manual.

Basically instead of playing with conditionals, you should just
fill an AC_SUBSTed variable with the objects you want.

test "x$needs_mode_cat" = xyes && condobjs="$condobj mod_cat.$(OBJEXT)"
test "x$needs_mode_cmp" = xyes && condobjs="$condobj mod_cmp.$(OBJEXT)"
test "x$needs_mode_fix" = xyes && condobjs="$condobj mod_fix.$(OBJEXT)"
...
AC_SUBST([condobjs])

Then use $(condobjs) to fill shntool_LDADD and
shntool_DEPENDENCIES in Makefile.am.
-- 
Alexandre Duret-Lutz





reply via email to

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