summaryrefslogtreecommitdiff
path: root/tools/build/v2/test/engine/parallel_multifile_actions_2.jam
blob: a85cf63fdb37cf59a71d0cb6a3c252f803abf65d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 2008 Jurko Gospodnetic, Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

#   Added to guard against a bug causing targets to be used before they
# themselves have finished building. This used to happen for targets built by a
# multi-file action that got triggered by another target, except when the target
# triggering the action was the first one in the list of targets produced by
# that action.
#
# Example:
#   When target A and target B were declared as created by a single action with
# A being the first one listed, and target B triggered running that action then
# while the action was still running, target A was already reporting as being
# built causing other targets depending on target A to be built prematurely.

if ! $(BJAM_SUBTEST)
{
    ECHO --- Testing -jN parallel execution of multi-file actions - 2... ;

    assert "...found 4 targets...
...updating 3 targets...
link dll
001 - linked
install installed_dll
002 - installed
...updated 3 targets...
" : (==) : [ SHELL "\"$(ARGV[1])\" -f parallel_multifile_actions_2.jam -sBJAM_SUBTEST=1 -j2" ] ;
}
else
{
    actions link
    {
        sleep 1
        echo 001 - linked
    }

    link dll lib ;

    actions install
    {
        echo 002 - installed
    }

    install installed_dll : dll ;
    DEPENDS installed_dll : dll ;

    DEPENDS all : lib installed_dll ;
}