From 9c5fcadc5f5cacf4c7c042fa770b84332a39bb5f Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 19 Mar 2019 20:25:30 -0400 Subject: [PATCH] Fix race condition building dependencies with multithreaded builds Former-commit-id: 04679b3b3b53c87c85c2d64c9f6d34a73969af2c --- src/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index 33d0959f9..2ef54aa10 100644 --- a/src/Makefile +++ b/src/Makefile @@ -233,17 +233,15 @@ persist-settings: distclean .PHONY: persist-settings # Prerequisites target -.make-prerequisites: - @touch $@ - # Clean everything, persist settings and build dependencies if anything changed ifneq ($(strip $(PREV_FINAL_CFLAGS)), $(strip $(FINAL_CFLAGS))) .make-prerequisites: persist-settings -endif - -ifneq ($(strip $(PREV_FINAL_LDFLAGS)), $(strip $(FINAL_LDFLAGS))) +else ifneq ($(strip $(PREV_FINAL_LDFLAGS)), $(strip $(FINAL_LDFLAGS))) .make-prerequisites: persist-settings +else +.make-prerequisites: endif + @touch $@ # keydb-server $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)