mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
build: Unify USE_BUNDLED, USE_BUNDLED_DEPS (#9046)
It's confusing that the Makefile uses a different name than CMake.
This commit is contained in:
11
Makefile
11
Makefile
@ -44,10 +44,11 @@ BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG)
|
|||||||
# Extra CMake flags which extend the default set
|
# Extra CMake flags which extend the default set
|
||||||
CMAKE_EXTRA_FLAGS ?=
|
CMAKE_EXTRA_FLAGS ?=
|
||||||
DEPS_CMAKE_FLAGS ?=
|
DEPS_CMAKE_FLAGS ?=
|
||||||
USE_BUNDLED_DEPS ?=
|
# Back-compat: USE_BUNDLED_DEPS was the old name.
|
||||||
|
USE_BUNDLED ?= $(USE_BUNDLED_DEPS)
|
||||||
|
|
||||||
ifneq (,$(USE_BUNDLED_DEPS))
|
ifneq (,$(USE_BUNDLED))
|
||||||
BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED_DEPS)
|
BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
||||||
@ -76,12 +77,12 @@ build/.ran-cmake: | deps
|
|||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
deps: | build/.ran-third-party-cmake
|
deps: | build/.ran-third-party-cmake
|
||||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||||
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
|
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build/.ran-third-party-cmake:
|
build/.ran-third-party-cmake:
|
||||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||||
mkdir -p $(DEPS_BUILD_DIR)
|
mkdir -p $(DEPS_BUILD_DIR)
|
||||||
cd $(DEPS_BUILD_DIR) && \
|
cd $(DEPS_BUILD_DIR) && \
|
||||||
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
||||||
|
@ -59,7 +59,7 @@ To list all targets:
|
|||||||
|
|
||||||
cmake --build build --target help
|
cmake --build build --target help
|
||||||
|
|
||||||
To skip "bundled" dependencies define `USE_BUNDLED_DEPS=NO` (CMake option: `USE_BUNDLED=NO`).
|
To skip "bundled" (`third-party/*`) dependencies define `USE_BUNDLED=NO`.
|
||||||
|
|
||||||
See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details.
|
See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user