forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: wrap make invocations with flock(1)
Lock each directory before entering it so when using -j, the same dependency isn't built more than once at a time. This doesn't get full -j parallelism though, since one make child will be sitting idle waiting for flock to receive its lock and continue making (which should then do nothing since it will have been built already). Unfortunately there's not much that can be done to fix that since it can't proceed until its dependency is built by another make process.
- Loading branch information
1 parent
d622e4d
commit 0b50133
Showing
10 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ SHARED_TEST_OBJS = \ | |
|
||
define execute-command | ||
$(1) | ||
|
||
endef | ||
|
||
all: $(PROGRAMS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
subdirs: $(SUBDIRS) | ||
$(SUBDIRS): | ||
@$(MAKE) -C $@ | ||
@flock $@ $(MAKE) -C $@ | ||
|
||
all: $(subdirs) | ||
|
||
SUBDIRS_CLEAN = $(addsuffix .clean,$(SUBDIRS)) | ||
clean: $(SUBDIRS_CLEAN) | ||
$(SUBDIRS_CLEAN): %.clean: | ||
@$(MAKE) -C $* clean | ||
@flock $* $(MAKE) -C $* clean | ||
|
||
SUBDIRS_INSTALL = $(addsuffix .install,$(SUBDIRS)) | ||
install: $(SUBDIRS_INSTALL) | ||
$(SUBDIRS_INSTALL): %.install: | ||
@$(MAKE) -C $* install | ||
@flock $* $(MAKE) -C $* install | ||
|
||
.PHONY: all clean install $(SUBDIRS) |