mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
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.
This commit is contained in:
parent
742787fe9e
commit
464bc16f81
@ -26,23 +26,15 @@ foreach(DF ${DOCFILES})
|
|||||||
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
|
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
|
||||||
endforeach()
|
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
|
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"
|
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
|
||||||
-u NONE
|
-u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
|
||||||
-i NONE
|
|
||||||
-e
|
|
||||||
--headless
|
|
||||||
-c "helptags ++t ."
|
|
||||||
-c quit
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
copy_docfiles
|
|
||||||
nvim
|
nvim
|
||||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
|
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||||
|
Loading…
Reference in New Issue
Block a user