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 ...@@ -48,8 +48,11 @@ $(SOURCES): depend
@$(preload_syms) $(PYTHON) $(abspath ./ $< $(DAEMON) $(TEMPLATE) $(CONFIG) $(ADDITIONAL) @$(preload_syms) $(PYTHON) $(abspath ./ $< $(DAEMON) $(TEMPLATE) $(CONFIG) $(ADDITIONAL)
# Synchronize submodules # Synchronize submodules
$(libfaketime_DIR)/Makefile $(libcwrap_DIR)/CMakeLists.txt: .gitmodules submodules: .gitmodules
@git submodule update --init @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 $(libfaketime): $(libfaketime_DIR)/Makefile
@CFLAGS="-O0 -g" $(MAKE) -s -C $(libfaketime_DIR) @CFLAGS="-O0 -g" $(MAKE) -s -C $(libfaketime_DIR)
$(libcwrap_cmake_DIR):$(libcwrap_DIR)/CMakeLists.txt $(libcwrap_cmake_DIR):$(libcwrap_DIR)/CMakeLists.txt
...@@ -60,4 +63,4 @@ $(libcwrap): $(libcwrap_cmake_DIR)/Makefile ...@@ -60,4 +63,4 @@ $(libcwrap): $(libcwrap_cmake_DIR)/Makefile
@CFLAGS="-O0 -g" $(MAKE) -s -C $(libcwrap_cmake_DIR) @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