%% <[EMAIL PROTECTED]> writes:

  af> yes, the funny thing is that when I run "gmake" twice,
  af> then the first invocation fails with

  af> but the second gmake run succeeds:

That's because the second time, the directory already exists.

  af> I have modified the dir creation to your suggestion

  af> __dummy := $(shell mkdir -p $(BLDDIR))

  af> and now it works in one pass, thank you (but still looks 
  af> strange to me, sorry. I don't understand what is wrong with

  af>   $(OBJECTS): $(BLDDIR)/stamp
 
  af> and why would it break parallel builds.)

That line won't, but that's not what you wrote in your last message:
there you had this line:

 > $(OBJECT): $(BLDDIR)/stamp $(BLDDIR)/rcomp.hpp

and _that_ is not parallel-safe (unless you add some other rules).
Basically, if you're going to be creating a directory using rules like
this then you must ensure that EVERY target that needs that directory to
exist depends on that stamp file.  You can't rely on ordering of targets
within a prerequisite list to be sure the directory is created first.


Anyway, the reason this doesn't work the first time is, as I mentioned
before, due to a misbehavior (I don't call it a bug because the behavior
was intentionally implemented, not by accident) in GNU make that has
been fixed for the next release.

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

Reply via email to