Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hardlinks target now recreate the links
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Jun 2017 09:34:13 +0000 (11:34 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Jun 2017 12:01:15 +0000 (14:01 +0200)
A file got desynch'ed on my disk. Maybe git did remove and recreate it?

tools/cmake/Distrib.cmake

index da1a160..64a6700 100644 (file)
@@ -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()