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}