This change replaces the call to build.sh with a call to build.py.
It also makes the build.py script a dependency to the cmake custom to
ensure we rebuild the cephadm binary if build.py changes. Since, if one
changes the build script used to make the binary we should rebuild the
output as the new script may indeed change the intended output.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
add_custom_command(
OUTPUT "${bin_target_file}"
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cephadm.py
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/cephadm.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/build.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND bash build.sh ${bin_target_file}
+ COMMAND ${Python3_EXECUTABLE} build.py ${bin_target_file}
)
add_custom_target(cephadm ALL