[Top][All Lists]

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

Re: Suggestion about the GNU Make Manual

From: Paul Smith
Subject: Re: Suggestion about the GNU Make Manual
Date: Tue, 03 Apr 2012 22:14:42 -0400

On Tue, 2012-04-03 at 16:20 -0600, Teng wrote:
> Excuse me. I have a question about Section 3.7 of the GNU Make Manual
> Version 3.81 whose title is "How Makefiles Are Remade". It said
> "After reading in all mkefiles, make will consider each as a goal target
> and attempt to update it." But according to my experience, Make doesn't
> only consider and execute the rules whose target is the Makefile itself,
> but also the rules with Makefile itself as one of the prerequisites.

GNU make doesn't behave that way: when remaking makefiles only the
makefiles and their prerequisites are rebuilt when deciding whether to
re-execute make.  Targets that list the makefile as a prerequisite are
not rebuilt as part of that decision.

Of course, if you list a makefile as a prerequisite of a target and the
makefile is newer than the target, the target will be rebuilt just like
any other prerequisite that is newer will cause a target to be rebuilt,
during the main makefile processing.  But it won't happen as part of the
"How Makefiles are Remade" processing.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "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]