[Top][All Lists]

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

[bug #57692] Parallel make doesn't work well with grouped targets

From: Philipp Krause
Subject: [bug #57692] Parallel make doesn't work well with grouped targets
Date: Wed, 29 Jan 2020 05:42:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0


                 Summary: Parallel make doesn't work well with grouped targets
                 Project: make
            Submitted by: spth
            Submitted on: Wed 29 Jan 2020 10:42:26 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None



I use GNU make 4.2.1 (as part of Debian GNU/Linux testing); I have not checked
if other versions of GNU make are affected.

I noticed that parallel make results in the rules for grouped targets being
executed multiple times (for me it corrupted files by multiple processes
appending to the same file simultaneously). Which is unlikely to be what users
want, as it easily results in corrupted files, and is inefficient.

The following Makefile, when invoked using make -j 4 reproduces the issue (I
see the text "Sleeping" four times):

RESULTS = a b c d

.PHONY: all clean

all: $(RESULTS)

        echo "Sleeping"; sleep 1;
        touch $(RESULTS)

        rm -f $(RESULTS)


Reply to this item at:


  Message sent via Savannah

reply via email to

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