%% G2345C <[EMAIL PROTECTED]> writes:

  g> because the next statement get executed and it failed
  g> because foo.o is not yet get copy.

There is simply no way whatsoever that make is invoking the second line
before the first finishes.  The code just doesn't work that way.

  g> Now if I modified the makefile to this:
  g> all :
  g>        $(SHELL) ./copyfile.sh
  g> then run it.

  g> wait for about 1 minute....
  g> then modify the makefile to this:
  g> all :
  g>        cd $(OBJ_DIR) && mv foo.o newfoo

  g> then run again it work great

Is this directory an NFS partition?  Maybe there is an issue where the
new file isn't visible immediately.

Or, maybe the copyfile.sh script puts the copy command into the
background then the copyfile.sh script exits before the copy command is
complete.  Try adding -x after the $(SHELL) line and see what's going
on.

Otherwise, I don't have any idea, but it's not the case that make is
invoking the second line before the first one finishes.

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