Skip to content

Commit

Permalink
build: Purge docs before rebuilding.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
justinmk committed Jun 16, 2016
1 parent 742787f commit 464bc16
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 464bc16

Please sign in to comment.