help-make
[Top][All Lists]
Advanced

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

Re: A not so clear behaviour for Makefiles including other makefiles


From: Paul D. Smith
Subject: Re: A not so clear behaviour for Makefiles including other makefiles
Date: Thu, 13 Nov 2003 07:14:28 -0500

%% Cristian Zoicas <address@hidden> writes:

  cz> I've discovered that the  makefiles including other makefiles
  cz> are read two times when the included makefiles must be remade
  cz> even if the including makefile is not remade.

Yes.

  cz> I would like to know if this behaviour is by design.

It is an unavoidable side-effect of the design, yes.  The way make
handles it when makefiles are remade is that, basically, it restarts
itself from the beginning (using the exec(2) system call).  Effectively
it's as if the first make had completed, then you'd typed "make" again a
second time.

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.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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




reply via email to

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