From: Martin Quinson Date: Wed, 28 Jun 2017 09:34:13 +0000 (+0200) Subject: hardlinks target now recreate the links X-Git-Tag: v3_17~505 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6fcdc166f72105f93c04dac5f9fe2b3d215d4c61 hardlinks target now recreate the links A file got desynch'ed on my disk. Maybe git did remove and recreate it? --- 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()