bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel Build, but Not for the Command-Line Targets.


From: Paul Smith
Subject: Re: Parallel Build, but Not for the Command-Line Targets.
Date: Sat, 23 Aug 2014 17:52:07 -0400

On Sat, 2014-08-23 at 16:25 +0100, Ralph Corderoy wrote:
> It seems a design flaw that I must
> 
>     make -sj clean && make -sj all && make -sj check && make -sj install

Well, that's because you're only considering this use-case, where we
know the context and it's clear that building them in parallel is not
what you want.

But, if you consider something like:

    make prog1 prog2 prog3 prog4

then it's clearly a design flaw if these programs are built serially.

> How do I tell make that the targets I explicitly name, which don't
> depend on one another, should be built sequentially, but parallelism
> may be used in building them?

There is no easy way to do this in GNU make today.

You can play some tricks with MAKECMDGOALS; something like this:

    all: $(filter clean,$(MAKECMDGOALS))

    clean::

    check:: $(filter all,$(MAKECMDGOALS))

    install:: $(filter check,$(MAKECMDGOALS))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]