Follow-up Comment #4, bug #44742 (project make):

Double-colon may not "play" nicely with parallel-execution.

The following example shows one situation, where parallel execution may skip
over a dependency (i.e. NOT building it at all), because it was linked in via
a double-colon.

As shown later, this occurs only for parallel execution, so you should choose
EITHER one of them, parallel-execution OR double-colon.

Using BOTH (parallel-execution AND double-colon), may ruin your build.


root: all;
        echo root


# 'all' is a double-colon,
#     This is the FIRST target in the double-colon linked-list
all::
        echo all_first

# 'all' is a double-colon,
#     This is the SECOND target in the double-colon linked-list
all:: 3;
        echo all_second


# implicit-rule to match targets: '1', '2', and '3'
%:
        sleep 0.$*


Running


make -r 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo all_second
all_second
echo root
root


Where, running


make -r -j2 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo root
root



Or, to put simply, running


make -rs 1 2 root


We get:


all_first
all_second
root


Where, running


make -rs -j2 1 2 root


We get:


all_first
root



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44742>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to