%% Noel Yap <[EMAIL PROTECTED]> writes:
ny> "Paul D. Smith" wrote:
>> The second make starts from scratch, with no memory or information
>> about the previous make (or even that there _WAS_ a previous make)
>> or what it did or didn't do.
ny> Is there any way of passing information to the exec'ed make (eg by
ny> setting environment variables or something)?
Not currently. The re-exec code doesn't go through the normal "put
exported make variables to the environment" processing that's done
before a shell is invoked... and I think it's correct to work that way,
otherwise code like:
ifndef FOO
FOO = $(BAR)
export FOO
endif
wouldn't work properly, if the rebuilt makefile impacted the value of
BAR.
However, this is probably worth requesting as a new feature: some way to
tell whether or not you've re-execed. I would assume it would be
something like MAKELEVEL, except for counting re-execs. That way people
could conditionalize on that where they wanted to. It has to be
carefully done though to be sure the variable is set where it should be
and _NOT_ set where it shouldn't be.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make