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 <psm...@gnu.org> 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 _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make