bugmake - Bugs: bug #13862, .WAIT target for parallel builds


bug #13862: .WAIT target for parallel builds

Submitted by:  None
Submitted on:  Wed 20 Jul 2005 01:48:52 PM UTC  
Votes:  1  
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  3.80 Operating System:  Any
Fixed Release:  None Triage Status:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 12 Feb 2014 11:07:04 PM UTC, comment #4:

What's the status here? .WAIT seems to be a useful feature.

  Spam posted by sevanath
Mon 03 Apr 2006 05:21:57 PM UTC, comment #3:

See also bug #13976.
See also these emails:

Nikolay: I don't understand your comment "[.NO_PARALLEL] is already supported in GNU make (though it has a different syntax)". I'm not aware of anything similar to this available in GNU make today. If you mean the .NOTPARALLEL special target, that simply disables all parallelism for any instance of make that parses the target. It doesn't apply only to the prerequisite targets; in fact it ignores them.

Or, you might mean order-only prerequisites. You can implement something like this with OO prerequisites, but it's very convoluted because you have to be sure every prerequisite also is defined to have the OO prereq, and so on.

Paul D. Smith <psmith>
Project Administrator
Sun 02 Apr 2006 06:52:34 AM UTC, comment #2:

I think the example in the description is not quite correct.
Usually .WAIT target is used to separate targets, that do not
depend one on another in sense of build process, but they should
not be built in parallel. For example, a nightly build process may include "building" and "testing":

nightly_build: install .WAIT test

install: all


In this case it is not desired to set the dependency (test: install), because it will not allow to rerun tests without
rebuilding. Also it does not make sense to do both targets in
parallel. If we use Sun Studio dmake, we usually add a .WAIT target between "install" and "test", or add the dependency:
.NO_PARALLEL: install test

I think the second way is better, and it is already supported
in GNU make (though it has different syntax). But it would be
great if GNU make will also support .WAIT, because in some
cases .WAIT is a simpler solution. For example, if there are
several sets of targets, and we don't want to build them
in parallel, we usually use .WAIT to separate them:

SET1=t11 t12 t13 t14 t15
SET2=t21 t22 t23 t24 t25
SET3=t31 t32 t33 t34 t35

all: ${SET1} .WAIT ${SET2} .WAIT ${SET3}

In this case it is a tricky task to use .NO_PARALLEL: to
separate the sets of targets.

Nikolay Molchanov <nikm>
Sun 22 Jan 2006 03:02:10 AM UTC, comment #1:

$ info make 'Phony Targets'

describes GNU make's method -- but, only in passing; it's very easy to miss (look for "foo: baz")!

Essentially: if "build" depends that the full
"install-includes" is done before it may start, then the makefile should say that dependency rule. A target won't start until after all of its prerequisites have finished.

all: install
install: build
build: install-includes

Wed 20 Jul 2005 01:48:52 PM UTC, original submission:

When building parallel builds (with -j) and with a target that looks like this:

all: install-includes build install

and build depends on that the full install-includes is done before it may start, GNU make doesn't handle this very well.

In BSD make there's a special target called .WAIT, that you can specify on the depend list, telling make to make sure everything before it is completed before starting with the next. Used like this:

all: install-includes .WAIT build .WAIT install

I have searched in info pages and google, but not been able to find out how to do this with GNU make. If it doesn't exist, this is an enhancement request for it.

-email is unavailable-



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sevanath (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-04-02 nikm Carbon-Copy- => Added nikm
    2005-07-21 tomas_skare Carbon-Copy- => Added tomas_skare

    Back to the top

    Powered by Savane 3.3