Commit 5c4acc5f authored by Petr Špaček's avatar Petr Špaček

Makefile: Fix race condition in submodule initialization

parent cd3d2350
Pipeline #2040 passed with stage
in 2 minutes and 13 seconds
......@@ -48,8 +48,11 @@ $(SOURCES): depend
@$(preload_syms) $(PYTHON) $(abspath ./ $< $(DAEMON) $(TEMPLATE) $(CONFIG) $(ADDITIONAL)
# Synchronize submodules
$(libfaketime_DIR)/Makefile $(libcwrap_DIR)/CMakeLists.txt: .gitmodules
submodules: .gitmodules
@git submodule update --init
# indirection through submodules target is necessary
# to prevent make from running "git submodule" commands in parallel
$(libfaketime_DIR)/Makefile $(libcwrap_DIR)/CMakeLists.txt: submodules
$(libfaketime): $(libfaketime_DIR)/Makefile
@CFLAGS="-O0 -g" $(MAKE) -s -C $(libfaketime_DIR)
......@@ -60,4 +63,4 @@ $(libcwrap): $(libcwrap_cmake_DIR)/Makefile
@CFLAGS="-O0 -g" $(MAKE) -s -C $(libcwrap_cmake_DIR)
.PHONY: depend all
.PHONY: submodules depend all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment