automake
[Top][All Lists]
Advanced

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

PATCH: subdirs and conditionals


From: Richard Boulton
Subject: PATCH: subdirs and conditionals
Date: Tue, 24 Apr 2001 20:37:50 +0100
User-agent: Mutt/1.2.5i

In current automake, if a variable is defined in terms of N conditionally
defined variables, an array of possible combinations of conditional values
is generated.  This array is, of course, of size 2^N, which implies that
only small numbers of conditionals can effectively be used together.

The gstreamer project, however, has a Makefile.am with conditionals for
each of a set of conditions dictating which SUBDIRS are to be built.  The
file currently has 16 separate conditionally defined variables (and will
have more soon), used only in the SUBDIRS variable.

The attached patch avoids computing the list of conditionals for the SUBDIRS
variable, where it is not actually needed, if the DIST_SUBDIRS variable is
defined.  This enables automake to generate the Makefile.in for gstreamer
within a memory footprint of about 4Mb.  Without the patch, automake grows
to around 160Mb, (and causes my home computer to run out of space and
crash).

A better solution may be to make variable_conditionally_defined() not call
variable_conditions(), determining whether a variable is conditionally
defined in a more efficient way.  However, this patch helps a great deal.

It may also be worth giving a warning if more than, say, 8 conditionals are
used together, to avoid this situation occurring unexpectedly.

-- 
Richard

Attachment: patch
Description: Text document


reply via email to

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