mkversion.sh: now regenerates version_pm3.c (and consequently the binaries) only when needed

and add --force to forcibly regenerate version_pm3.c

and small fixes:
* document mkversion.sh usage
* remove call to mkversion.sh in client/experimental_lib/CMakeLists.txt on release
* remove call to old `mkversion.pl` in bootrom/Makefile
* just in case, mkversion.sh takes care of atomic write of the file
This commit is contained in:
Philippe Teuwen committed 2023-08-03 01:03:24 +02:00
1 parent 9dfc39dbbf
commit cb72897b17
8 files changed
+61 -15

No files matched your search

+1 -1
View File
@@ -397,7 +397,7 @@ set (TARGET_SOURCES
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/version_pm3.c
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh > ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
DEPENDS ${PM3_ROOT}/common/default_version_pm3.c
)