diff --git a/Makefile b/Makefile index e35140b2e..5e35342fc 100644 --- a/Makefile +++ b/Makefile @@ -2085,7 +2085,11 @@ endif # --------------------------------------------------------------------------- all_sources = $(LIB_SOURCES) $(MAIN_SOURCES) $(MOCK_LIB_SOURCES) $(TOOL_LIB_SOURCES) $(BENCH_LIB_SOURCES) $(TEST_LIB_SOURCES) $(ANALYZER_LIB_SOURCES) $(STRESS_LIB_SOURCES) -DEPFILES = $(all_sources:.cc=.cc.d) $(FOLLY_SOURCES:.cpp=.cpp.d) +DEPFILES = $(all_sources:.cc=.cc.d) + +ifeq ($(USE_FOLLY_DISTRIBUTED_MUTEX),1) + DEPFILES += $(FOLLY_SOURCES:.cpp=.cpp.d) +endif # Add proper dependency support so changing a .h file forces a .cc file to # rebuild.