URL: <https://savannah.gnu.org/bugs/?57692>
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 _______________________________________________________ Details: 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) $(RESULTS) &: echo "Sleeping"; sleep 1; touch $(RESULTS) clean: rm -f $(RESULTS) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?57692> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/