Skip to content

Commit

Permalink
CMake: Avoid dependency cycles in helptags targets. neovim#3983
Browse files Browse the repository at this point in the history
Declare dependency in terms of directory, rather than individual doc
files to avoid target dependency cycles.  This still maintains install
targets at doc file level.
  • Loading branch information
lyuts authored and justinmk committed Feb 3, 2016
1 parent 8e92b7f commit 4f4b8ea
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ foreach(DF ${DOCFILES})
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
endforeach()

add_custom_command(OUTPUT ${BUILDDOCFILES}
COMMAND ${CMAKE_COMMAND} -E copy_directory
add_custom_command(OUTPUT copy_docfiles
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
DEPENDS
${DOCFILES})
)

add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
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
Expand All @@ -43,7 +40,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
-c "helptags ++t ."
-c quit
DEPENDS
${BUILDDOCFILES}
copy_docfiles
nvim
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
)
Expand Down

0 comments on commit 4f4b8ea

Please sign in to comment.