[H-GEN] gnu make command-line target ordering problems?
Ben Carlyle
benc at foxboro.com.au
Sun Oct 17 21:49:52 EDT 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
Byron wrote:
> > As a side note, I agree with Ben on the counter intuitive nature of having
> > those multiple targets executed in parallel.
Martin wrote:
> What do you think the "parallel" option should do?
I think the simplest way to state my case is this:
The parallel execution of command-line targets violates the make
commands are processed in order. If the parallel make does not
process the command-line in order, then it has different behaviour
characteristics to the sequential make. The command-line should
not specify a list of depedancies, but a list of targets to be
executed one after the other.
Executing the command-line parameters in parallel is equivalent
to adding a rule
commandline: arg1 arg2 arg3
to the makefile.
Executing the command-line parameters sequentially is equivalent
to adding the rules
commandline: arg3
arg3: arg2
arg2: arg1
It is this second rule that best represents the behaviour of a
sequential make, hence it is this second rule that should best
represent the behaviour of a parallel make.
Executing command-line parameters in parallel is equivalent to
removing the implied dependancies between commandline parameters.
If your remove that from the parallel make, then you should also
remove it from the sequential make. The statement that make
processes its targets in order must be deleted from all
documentation, for in fact it executes them in a random order that
just so happens usually runs from first to last.
Parallelism should be left to the defined make dependancies, not
assumed from the commandline. make clean should run parallel
clean targets. make build should run parallel build targets.
make clean build should run parallel clean targets, then parallel
build targets.
Benjamin.
(my humble opinion is not so humble today)
--
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