Commit 9e259d58 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Remove race condition during `make dist`

Introduced by 85828b8f

This is running 2 git processes in parallel, which, if unlucky can cause
either of them to fail with "File already exists" error.
parent 787c4758
...@@ -43,6 +43,13 @@ IF(GIT_EXECUTABLE) ...@@ -43,6 +43,13 @@ IF(GIT_EXECUTABLE)
MESSAGE(STATUS "Running git checkout-index") MESSAGE(STATUS "Running git checkout-index")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" checkout-index --all --prefix=${PACKAGE_DIR}/ COMMAND "${GIT_EXECUTABLE}" checkout-index --all --prefix=${PACKAGE_DIR}/
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
SET(GIT_EXECUTABLE)
ENDIF()
EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" submodule foreach "${GIT_EXECUTABLE} checkout-index --all --prefix=${PACKAGE_DIR}/$path/" COMMAND "${GIT_EXECUTABLE}" submodule foreach "${GIT_EXECUTABLE} checkout-index --all --prefix=${PACKAGE_DIR}/$path/"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT RESULT_VARIABLE RESULT
......
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