[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How could I help now?
From: |
Ramón García |
Subject: |
Re: How could I help now? |
Date: |
Mon, 1 Oct 2007 00:49:07 +0200 |
I have been doing some tests. I can confirm that if the call that
initializes automatic variables (call set_file_variables() in function
expand.c::reference_variable) is removed, the program behaves
correctly in the interesting cases. So, as far as this project is
concerned, removing the initialization of automatic variables before a
target::var expansion is safe.
> 1. Always returns the right value regardless of where/when it's
> used.
> 2. Always returns the empty string until after all makefiles are
> read in and make starts processing the rules; then always
> returns the right value.
> 3. Returns the empty string up until target T is processed; then
> returns the right value.
> 4. Always returns the empty string unless we're currently
> processing target T (that is, $(T::@) cannot be used outside of
> the recipe for T).
As far as the out of date determination is concerted both #2 and #3
satisfy requirements. I prefer 2 because the behaviour is simple for
the user. The behaviour of automatic variables defined if the target
is before the current one in the depth-first order is too complex. It
will cause suprises. But I am not completely sure.
Ramon