From f936a962d04f9937946018cc1386f20bda6fc1de Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 19 Jan 2024 13:21:25 +0100 Subject: build: create separate targets for nvim with and without runtime files This distinction is important for correct dependency management, as the nvim binary is used to create some runtime files. The nvim binary (and the target to build it) is thus called `nvim_bin` and the target to build all of nvim (binary+runtime) is called `nvim`. --- runtime/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index a44713d4ce..c9655ad9b9 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -1,5 +1,9 @@ -set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/src/nvim/generators/gen_vimvim.lua) +set(GENERATED_RUNTIME_DIR ${PROJECT_BINARY_DIR}/runtime) + +set(GENERATED_HELP_TAGS ${GENERATED_RUNTIME_DIR}/doc/tags) set(GENERATED_PACKAGE_DIR ${GENERATED_RUNTIME_DIR}/pack/dist/opt) +set(GENERATED_SYN_VIM ${GENERATED_RUNTIME_DIR}/syntax/vim/generated.vim) +set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/src/nvim/generators/gen_vimvim.lua) file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax/vim) @@ -32,7 +36,7 @@ foreach(PACKAGE ${PACKAGES}) COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" -u NONE -i NONE -e --headless -c "helptags doc" -c quit DEPENDS - nvim + nvim_bin nvim_runtime_deps WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}" ) @@ -66,7 +70,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS} COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit DEPENDS - nvim + nvim_bin nvim_runtime_deps WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}" ) @@ -81,7 +85,7 @@ add_custom_target(doc_html ) add_custom_target( - runtime ALL + nvim_runtime DEPENDS ${GENERATED_SYN_VIM} ${GENERATED_HELP_TAGS} -- cgit