2022-10-25 18:17:54 +02:00
|
|
|
set (MAN_PAGE_NAME "patchelfcrc.1.gz")
|
|
|
|
|
|
|
|
add_custom_target(man-page
|
|
|
|
ALL
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE_NAME}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE_NAME}
|
|
|
|
COMMAND
|
2023-01-15 21:38:13 +01:00
|
|
|
bash -c "cat \"${CMAKE_CURRENT_SOURCE_DIR}/patchelfcrc.1.md\" | sed \"s/!version!/`git describe --tags --always --dirty`/\" | pandoc -s -t man | gzip > \"${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE_NAME}\""
|
2022-10-25 18:17:54 +02:00
|
|
|
VERBATIM
|
|
|
|
WORKING_DIRECTORY
|
2023-01-15 21:38:13 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2022-10-25 18:17:54 +02:00
|
|
|
MAIN_DEPENDENCY
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/patchelfcrc.1.md
|
2023-01-15 21:38:13 +01:00
|
|
|
)
|