On Tue, Jul 01, 2008 at 11:41:25AM +0200, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have a basic question about command line execution when
> using -jN to build a target.
> How are the command lines of a single make rule scheduled
> for execution when running parallel builds? It seems clear
> that they will be started in the order given, but does make
> wait for one to complete before starting the next?
> (By wait, I expect it can, and will, get on with other rules'
> command lines in parallel, if possible.)
> We have command sequences within single rules which have to
> follow step wise (so are implicitly interdependent) and we
> rely only on the ordering of the command lines within a rule
> to ensure this. Of course we could use && constructs to
> construct single command lines that the shell would then
> sequence for us, but this is not how the majority of our
> makefiles are written.
[Please type enter to break your looong lines - thanks]
> Is it safe to turn on parallel building in this case or do
> we need to rewrite our rules?
make will execute all commands for a single rule sequentially.
>
> As an example, is the following safe in a parallel build
> when each command needs to be complete before the next is run?:
>
> target.x: input1.dat input2.dat
> extract_data input1.dat >output.dat
> extract_data input2.dat >>output.dat
> target_create output.dat >target.x
> rm output.dat
So this is safe to do.
Sam
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make