mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Replace roff man pages with asciidoctor
This replaces the generation of man pages on project setup by a on-demand generation via asciidoctor. An exception are the man pages for the commands `day`, `month`, and `week` which are simply redirects to the man page `timew-chart.1`. Those are now static files in the Timewarrior repository. A CMake find module to detect asciidoctor was added. If asciidoctor is found, the targets `doc`, `man1`, and `man7` are created. Those targets are also added to the default build target. If asciidoctor is not available, the target `doc` is available, but it only emits a message to install asciidoctor first. Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
65ef38658b
commit
b189ccb020
80 changed files with 1256 additions and 1527 deletions
|
@ -5,47 +5,16 @@ message ("-- Configuring documentation")
|
|||
add_subdirectory (holidays)
|
||||
add_subdirectory (themes)
|
||||
|
||||
configure_file (man1/timew.1.in man1/timew.1)
|
||||
configure_file (man1/timew-annotate.1.in man1/timew-annotate.1)
|
||||
configure_file (man1/timew-cancel.1.in man1/timew-cancel.1)
|
||||
configure_file (man1/timew-chart.1.in man1/timew-chart.1)
|
||||
configure_file (man1/timew-config.1.in man1/timew-config.1)
|
||||
configure_file (man1/timew-continue.1.in man1/timew-continue.1)
|
||||
configure_file (man1/timew-day.1.in man1/timew-day.1)
|
||||
configure_file (man1/timew-delete.1.in man1/timew-delete.1)
|
||||
configure_file (man1/timew-diagnostics.1.in man1/timew-diagnostics.1)
|
||||
configure_file (man1/timew-export.1.in man1/timew-export.1)
|
||||
configure_file (man1/timew-extensions.1.in man1/timew-extensions.1)
|
||||
configure_file (man1/timew-fill.1.in man1/timew-fill.1)
|
||||
configure_file (man1/timew-gaps.1.in man1/timew-gaps.1)
|
||||
configure_file (man1/timew-get.1.in man1/timew-get.1)
|
||||
configure_file (man1/timew-help.1.in man1/timew-help.1)
|
||||
configure_file (man1/timew-join.1.in man1/timew-join.1)
|
||||
configure_file (man1/timew-lengthen.1.in man1/timew-lengthen.1)
|
||||
configure_file (man1/timew-modify.1.in man1/timew-modify.1)
|
||||
configure_file (man1/timew-month.1.in man1/timew-month.1)
|
||||
configure_file (man1/timew-move.1.in man1/timew-move.1)
|
||||
configure_file (man1/timew-report.1.in man1/timew-report.1)
|
||||
configure_file (man1/timew-resize.1.in man1/timew-resize.1)
|
||||
configure_file (man1/timew-shorten.1.in man1/timew-shorten.1)
|
||||
configure_file (man1/timew-show.1.in man1/timew-show.1)
|
||||
configure_file (man1/timew-split.1.in man1/timew-split.1)
|
||||
configure_file (man1/timew-start.1.in man1/timew-start.1)
|
||||
configure_file (man1/timew-stop.1.in man1/timew-stop.1)
|
||||
configure_file (man1/timew-summary.1.in man1/timew-summary.1)
|
||||
configure_file (man1/timew-tag.1.in man1/timew-tag.1)
|
||||
configure_file (man1/timew-tags.1.in man1/timew-tags.1)
|
||||
configure_file (man1/timew-track.1.in man1/timew-track.1)
|
||||
configure_file (man1/timew-undo.1.in man1/timew-undo.1)
|
||||
configure_file (man1/timew-untag.1.in man1/timew-untag.1)
|
||||
configure_file (man1/timew-week.1.in man1/timew-week.1)
|
||||
if (ASCIIDOCTOR_FOUND)
|
||||
set (ASCIIDOCTOR_OPTIONS "--attribute=manmanual=User Manuals"
|
||||
"--attribute=mansource=timew ${PROJECT_VERSION}"
|
||||
"--attribute=man-linkstyle='pass:[blue R < >]'")
|
||||
|
||||
configure_file (man7/timew-config.7.in man7/timew-config.7)
|
||||
configure_file (man7/timew-dates.7.in man7/timew-dates.7)
|
||||
configure_file (man7/timew-dom.7.in man7/timew-dom.7)
|
||||
configure_file (man7/timew-durations.7.in man7/timew-durations.7)
|
||||
configure_file (man7/timew-hints.7.in man7/timew-hints.7)
|
||||
configure_file (man7/timew-ranges.7.in man7/timew-ranges.7)
|
||||
add_subdirectory (man1)
|
||||
add_subdirectory (man7)
|
||||
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man1/ DESTINATION ${TIMEW_MAN1DIR} FILES_MATCHING PATTERN "*.1")
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man7/ DESTINATION ${TIMEW_MAN7DIR} FILES_MATCHING PATTERN "*.7")
|
||||
add_custom_target (doc ALL DEPENDS man1 man7)
|
||||
else (ASCIIDOCTOR_FOUND)
|
||||
add_custom_target (doc ALL
|
||||
COMMAND echo "Tool 'asciidoctor' is required to generate man pages! Please install it first.")
|
||||
endif (ASCIIDOCTOR_FOUND)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue