On Thursday, 7 September, Torsten Mohr ([EMAIL PROTECTED]) wrote: > when i use automatic dependency generation in a project > then "make" needs to read these dependencies in at some > point. How does it know when to do that?
The way it works is this: first, make reads the normal makefile and all the included makefiles. As it reads them in it keeps track of them. Then, it pretends that you ran "make Makefile inc1.mk inc2.mk ..."; in other words, make treats every makefile as if it were a target, and tries to build it. After it's looked at rebuilding every makefile it read in the first step, it sees if any of those makefiles actually got rebuilt (if they changed). If not, it continues on with the normal targets. If one DID change, then make re-execs itself completely; that is it starts over from the beginning and does the entire thing all over again. This time, most likely, all the makefiles will be up to date and it will go to the normal targets... but it sometimes happens, depending on how your makefiles are constructed, that it may have to do this a few times before all makefiles are up to date. HTH! -- ------------------------------------------------------------------------------- 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://lists.gnu.org/mailman/listinfo/help-make
