automake-ng
[Top][All Lists]
Advanced

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

Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug


From: Akim Demaille
Subject: Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83
Date: Tue, 15 May 2012 13:44:22 +0200

Hi Stefano!

Le 15 mai 2012 à 12:44, Stefano Lattarini a écrit :

> +am__memoize = \
> +  $(if $(am__memoized_value/$1),$(am__memoized_value/$1),$(strip \
> +    $(eval am__memoized_value/$1 := $$2))$(am__memoized_value/$1))

If the result is large, we might be evaluating twice
am__memoized_value/$1 for no good reason.  Can't $(or)
be used instead?

Or maybe uses $(origin) to implement ifndef.

But maybe my model of Make is wrong.  I'm thinking like if
it were m4 here, in which case avoiding duplicate expansion
would be a Good Thing.  If $(if) is basically O(1) for
:=-variables, there is no worry.


reply via email to

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