From 0b501335f55d96ab78251b75310f3417f8659c6d Mon Sep 17 00:00:00 2001 From: joshua stein Date: Fri, 27 Dec 2019 23:50:39 -0600 Subject: 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. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8ab4e9408b..31e79296d0 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,6 @@ ifeq ($(UNAME_S),Darwin) test: else test: - $(QUIET) $(MAKE) -C AK/Tests clean all clean + $(QUIET) flock AK/Tests $(MAKE) -C AK/Tests clean all clean endif -- cgit v1.2.3