From 6fcdc166f72105f93c04dac5f9fe2b3d215d4c61 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 28 Jun 2017 11:34:13 +0200 Subject: [PATCH] hardlinks target now recreate the links A file got desynch'ed on my disk. Maybe git did remove and recreate it? --- tools/cmake/Distrib.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/cmake/Distrib.cmake b/tools/cmake/Distrib.cmake index da1a160519..64a67004a5 100644 --- a/tools/cmake/Distrib.cmake +++ b/tools/cmake/Distrib.cmake @@ -248,8 +248,7 @@ if (NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) # Actually copy the file add_custom_command( TARGET hardlinks - COMMAND test -e ${CMAKE_BINARY_DIR}/${file} || echo "Hard link to ${CMAKE_HOME_DIRECTORY}/${file} ${CMAKE_BINARY_DIR}/${file}" - COMMAND test -e ${CMAKE_BINARY_DIR}/${file} || ln ${CMAKE_HOME_DIRECTORY}/${file} ${CMAKE_BINARY_DIR}/${file_location} + COMMAND if test -f ${CMAKE_HOME_DIRECTORY}/${file} \; then rm -f ${CMAKE_BINARY_DIR}/${file}\; ln ${CMAKE_HOME_DIRECTORY}/${file} ${CMAKE_BINARY_DIR}/${file_location}\; fi ) endforeach(file ${source_to_pack}) endif() -- 2.20.1