%% <[EMAIL PROTECTED]> writes:

  jz> So, why are hello.d and main.d generated twice ?

They are generated the first time because they are out of date, and make
needs to regenerate them because they are included.

Then make re-execs itself and starts again.

This time they are _also_ generated, this time because of the
--always-make flag: those files are prerequisites of the targets you
want to build, and --always-make says that all prerequisites should be
rebuilt.

  jz> What can I do to avoid this problem ?

You can't.  There's no way for the second make invocation to know that
the --always-make shouldn't apply to the included makefiles.

You should probably not use this method of auto-dependency
generation.  Instead use the advanced method described on my website
below.  This method won't have this problem.

-- 
-------------------------------------------------------------------------------
 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

Reply via email to