mirror of
https://github.com/neovim/neovim.git
synced 2025-11-05 02:04:29 +00:00
Avoid ever creating .deps directory
Thanks to @jszakmeister this uses make own features.
This commit is contained in:
21
Makefile
21
Makefile
@@ -1,3 +1,6 @@
|
|||||||
|
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
|
||||||
|
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||||
|
|
||||||
-include local.mk
|
-include local.mk
|
||||||
|
|
||||||
CMAKE_BUILD_TYPE ?= Debug
|
CMAKE_BUILD_TYPE ?= Debug
|
||||||
@@ -33,6 +36,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 ?=
|
||||||
|
|
||||||
|
ifneq (,$(USE_BUNDLED_DEPS))
|
||||||
|
BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED_DEPS)
|
||||||
|
endif
|
||||||
|
|
||||||
# For use where we want to make sure only a single job is run. This also avoids
|
# For use where we want to make sure only a single job is run. This also avoids
|
||||||
# any warnings from the sub-make.
|
# any warnings from the sub-make.
|
||||||
@@ -48,17 +56,22 @@ cmake:
|
|||||||
$(MAKE) build/.ran-cmake
|
$(MAKE) build/.ran-cmake
|
||||||
|
|
||||||
build/.ran-cmake: | deps
|
build/.ran-cmake: | deps
|
||||||
mkdir -p build
|
|
||||||
cd build && cmake -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) ..
|
cd build && cmake -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) ..
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
deps: | .deps/build/third-party/.ran-cmake
|
deps: | build/.ran-third-party-cmake
|
||||||
|
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||||
+$(BUILD_CMD) -C .deps/build/third-party
|
+$(BUILD_CMD) -C .deps/build/third-party
|
||||||
|
endif
|
||||||
|
|
||||||
.deps/build/third-party/.ran-cmake:
|
build/.ran-third-party-cmake:
|
||||||
|
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||||
mkdir -p .deps/build/third-party
|
mkdir -p .deps/build/third-party
|
||||||
cd .deps/build/third-party && \
|
cd .deps/build/third-party && \
|
||||||
cmake -G '$(BUILD_TYPE)' $(DEPS_CMAKE_FLAGS) ../../../third-party
|
cmake -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) \
|
||||||
|
$(DEPS_CMAKE_FLAGS) ../../../third-party
|
||||||
|
endif
|
||||||
|
mkdir -p build
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
test: | nvim
|
test: | nvim
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ set_environment() {
|
|||||||
eval $($prefix/bin/luarocks path)
|
eval $($prefix/bin/luarocks path)
|
||||||
export PATH="$prefix/bin:$PATH"
|
export PATH="$prefix/bin:$PATH"
|
||||||
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
|
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
|
||||||
export DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF"
|
export USE_BUNDLED_DEPS=OFF
|
||||||
}
|
}
|
||||||
|
|
||||||
# install prebuilt dependencies
|
# install prebuilt dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user