From 69eb4fa0c5a4e8b039b177f556f57614b6acb422 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 24 Jun 2019 04:13:57 +0200 Subject: [PATCH] build: Makefile: handle "rm -rf .deps" (#10305) - make `build/.ran-third-party-cmake` depend on `$(DEPS_BUILD_DIR)`. It still creates `build` there as a side-effect, which does not belong there really, but is OK for now. - add an explicit target for `$(DEPS_BUILD_DIR)` (".deps"), only with USE_BUNDLED=1 (the default). This makes it easier to rebuild deps cleanly, by using `rm -rf .deps; make`. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 79dbc27504..1025f08b61 100644 --- a/Makefile +++ b/Makefile @@ -88,15 +88,18 @@ ifeq ($(call filter-true,$(USE_BUNDLED)),) +$(BUILD_CMD) -C $(DEPS_BUILD_DIR) endif -build/.ran-third-party-cmake: +build/.ran-third-party-cmake:: + mkdir -p build + touch $@ + ifeq ($(call filter-true,$(USE_BUNDLED)),) +build/.ran-third-party-cmake:: $(DEPS_BUILD_DIR) +$(DEPS_BUILD_DIR): mkdir -p $(DEPS_BUILD_DIR) cd $(DEPS_BUILD_DIR) && \ $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \ $(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party endif - mkdir -p build - touch $@ # TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag. oldtest: | nvim helptags