mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdHelp: Generate 'additional help' section from man pages
This will ensure that the additional help displayed will match valid help targets. Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
parent
b5df2a2aa5
commit
a796baec32
4 changed files with 90 additions and 9 deletions
|
@ -5,6 +5,18 @@ include_directories (${CMAKE_SOURCE_DIR}
|
|||
${CMAKE_SOURCE_DIR}/src/libshared/src
|
||||
${TIMEW_INCLUDE_DIRS})
|
||||
|
||||
set (ADDITIONAL_HELP_H "additional-help.h")
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${ADDITIONAL_HELP_H}
|
||||
COMMAND /bin/sh src/commands/generate-additional-help.sh >src/commands/${ADDITIONAL_HELP_H}
|
||||
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/generate-additional-help.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating ${ADDITIONAL_HELP_H}")
|
||||
|
||||
ADD_CUSTOM_TARGET (generate_additional_help
|
||||
DEPENDS ${ADDITIONAL_HELP_H})
|
||||
|
||||
set (commands_SRCS CmdAnnotate.cpp
|
||||
CmdCancel.cpp
|
||||
CmdChart.cpp
|
||||
|
@ -38,4 +50,4 @@ set (commands_SRCS CmdAnnotate.cpp
|
|||
CmdUntag.cpp)
|
||||
|
||||
add_library (commands STATIC ${commands_SRCS})
|
||||
|
||||
add_dependencies (commands generate_additional_help)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue