diff options
| -rw-r--r-- | CMakeLists.txt | 7 | ||||
| -rw-r--r-- | README.md | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b230fe5..e63860b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,12 +44,13 @@ target_link_libraries(cpsc ) add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc/cpsc.1" + COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/doc" COMMAND pandoc --standalone --from=markdown --to=man "${CMAKE_CURRENT_SOURCE_DIR}/doc/cpsc.md" - --output "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1" + --output "${CMAKE_CURRENT_BINARY_DIR}/doc/cpsc.1" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc/cpsc.md" COMMENT "Generating cpsc(1) manual" VERBATIM ) -add_custom_target(doc DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1") +add_custom_target(doc DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/cpsc.1") @@ -103,8 +103,7 @@ if execution fails. ## Manual -The command-line quick reference is in `doc/cpsc.md`. Generating the man page -requires Pandoc; ordinary builds do not. +The command-line quick reference is in `doc/cpsc.md`. Generating the man page requires Pandoc; ordinary builds do not. From the project root on Linux: @@ -112,11 +111,11 @@ From the project root on Linux: sudo apt-get install pandoc cmake -S . -B build make -C build doc -man ./build/cpsc.1 +man ./build/doc/cpsc.1 ``` You can also run `make doc` inside the configured `build/` directory. -The output is `build/cpsc.1` and is regenerated when the Markdown source changes. +The output is `build/doc/cpsc.1` and is regenerated when the Markdown source changes. # Note |
