mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
0b501335f5
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.
17 lines
386 B
Text
17 lines
386 B
Text
subdirs: $(SUBDIRS)
|
|
$(SUBDIRS):
|
|
@flock $@ $(MAKE) -C $@
|
|
|
|
all: $(subdirs)
|
|
|
|
SUBDIRS_CLEAN = $(addsuffix .clean,$(SUBDIRS))
|
|
clean: $(SUBDIRS_CLEAN)
|
|
$(SUBDIRS_CLEAN): %.clean:
|
|
@flock $* $(MAKE) -C $* clean
|
|
|
|
SUBDIRS_INSTALL = $(addsuffix .install,$(SUBDIRS))
|
|
install: $(SUBDIRS_INSTALL)
|
|
$(SUBDIRS_INSTALL): %.install:
|
|
@flock $* $(MAKE) -C $* install
|
|
|
|
.PHONY: all clean install $(SUBDIRS)
|