aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-06-16 00:27:11 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-06-16 00:31:54 -0400
commit464bc16f81361a461c1da2769f13cebd82f067be (patch)
treebc278d6f7f6d3f15298340faaee80b34825f6046
parent742787fe9e9016971edf0eefc7cd9a1d19f73008 (diff)
downloadrneovim-464bc16f81361a461c1da2769f13cebd82f067be.tar.gz
rneovim-464bc16f81361a461c1da2769f13cebd82f067be.tar.bz2
rneovim-464bc16f81361a461c1da2769f13cebd82f067be.zip
build: Purge docs before rebuilding.
If a help file is renamed, stale help files in the build workspace will cause duplicate tags (which causes the build to fail). To avoid this, always delete build/runtime/doc/ before building helptags.
-rw-r--r--runtime/CMakeLists.txt18
1 files changed, 5 insertions, 13 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 4dbd193dab..a30bae388d 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -26,23 +26,15 @@ foreach(DF ${DOCFILES})
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
endforeach()
-add_custom_command(OUTPUT copy_docfiles
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
-)
-
add_custom_target(helptags
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${GENERATED_RUNTIME_DIR}/doc
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
- -u NONE
- -i NONE
- -e
- --headless
- -c "helptags ++t ."
- -c quit
+ -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
DEPENDS
- copy_docfiles
nvim
- WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
+ WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
)
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}