automake
[Top][All Lists]
Advanced

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

only set variables in some Makefile.in's


From: Ralf Wildenhues
Subject: only set variables in some Makefile.in's
Date: Thu, 20 Oct 2005 09:03:19 +0200
User-agent: Mutt/1.5.11

Another crazy(?) idea based on large packages with many Makefile.in's,
directly borrowing from the reasoning in [1].

How about allowing the user a little finer-grained choice of where
Makefile variables are needed, as in:

--- snip ---
@item AM_SUBST_SET_IN(PATH..., VARIABLE, [VALUE])
Same as @code{AC_SUBST(VARIABLE, [VALUE])}, except that Automake will
initialize the @code{make} variable only in every input file to a
@file{Makefile} below the space-separated list of paths.  This macro
calls @code{AC_SUBST}.

For example, the following:

@example
AM_SUBST_SET_IN([doc/Makefile src/sub], [FOOBAR])
@end example

will initialize @var{FOOBAR} in @file{doc/Makefile.in} and in each
@file{Makefile.in} created in the tree below @file{src/sub}.
As another example, @code{AM_SUBST_SET_IN([.], [VAR], [VALUE])} is
completely equivalent to @code{AC_SUBST([VAR], [VALUE])}.
--- snip ---


The idea is to have an implementation which, in the limit of large
packages, allows all of
- better `automake' execution time
- smaller `Makefile.in' sizes
- thus also better `config.status' execution time

by automake internally building a tree of "pointers" to the variables
to substitute.  If we only stored the path information along with the
variable, automake will still have to evaluate all of them for every
Makefile.in, so it won't save any execution time.  E.g., all plain
AC_SUBSTed variables will have one pointer in the `.' root node of the
tree.

I will try to benchmark this before proceeding, in order to verify that
this is an actual automake execution time bottleneck; a thing which I
haven't done yet.

Thoughts?

Cheers,
Ralf

[1]
http://lists.gnu.org/archive/html/automake-patches/2005-10/msg00022.html




reply via email to

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