[H-GEN] gnu make command-line target ordering problems?

Jason Henry Parker jasonp at uq.net.au
Fri Oct 15 04:15:25 EDT 1999


[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]

Ben Carlyle <benc at foxboro.com.au> writes:

> Does anyone have experience of the behaviour of gnu make when targets
> are listed on the command line?

> My problem is to do with the way it handles a combination of the
> -j option and multiple command-line targets, in which case it
> simply runs the command-line targets in parallel.

Speaking as someone who recently learned Far More Than Everything They
Ever Wanted To Know about GNU Make, I think this is The Right Thing to
do for this special case.  What you're really saying when you say:

$ make foo bar baz boo

is `make foo, and bar, and baz, and boo, but stop if one of them has
an error', NOT `make boo, but only if baz succeeds, but only if bar
succeeds, but only if foo succeeds'.  That is merely a happy
coincidence of the way make works (and probably a bit of
rule-fulfillment, depending on the dependencies of foo, bar, baz and
boo).

When you do a -j make, you're giving make permission to run in
parallel, so it's possibly a little excessive to expect make to stop
running baz simply because the shorter-running foo job has failed.

jason
-- 
``If remarks are passed that are unpleasant in the instant, you   ____  
will see that context can make them something between droll and   \ _/__
riotously funny.  If things are said that are painfully true,      \X  /
then it is only passing truth and will change.'' -- Hannibal Lecter  \/ 

--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list