build: remove contents of build/runtime/doc/* surgically (#8024)

Only remove the directory contents. If the directory itself is removed,
then `sudo make install` creates a root-owned …/doc/ directory. That
breaks the next non-root build.

This was an accident of 0b1904d835.

Note: the following does not work, because it misses renamed help files
(which would no longer be in the build-tree definition)

    COMMAND ${CMAKE_COMMAND} -E remove ${BUILDDOCFILES} ${GENERATED_HELP_TAGS}
This commit is contained in:
Justin M. Keyes 2018-02-19 21:10:16 +01:00 committed by GitHub
parent 00665d3c70
commit 06b7561e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ foreach(DF ${DOCFILES})
endforeach()
add_custom_target(helptags
COMMAND ${CMAKE_COMMAND} -E remove_directory ${GENERATED_RUNTIME_DIR}/doc
COMMAND ${CMAKE_COMMAND} -E remove ${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"