From 247984d132fa33b9f458eb2b510b9e221afc21fe Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Wed, 23 Apr 2014 04:59:25 -0400 Subject: Make it easy to get a verbose build of Neovim. This allows you to do make VERBOSE=1 from the top-level and see the actual compile lines. --- Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c334ea7f87..0f7c1f0440 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,15 @@ ifeq (,$(BUILD_TOOL)) endif endif +ifneq ($(VERBOSE),) + # Only need to handle Ninja here. Make will inherit the VERBOSE variable. + ifeq ($(BUILD_TYPE),Ninja) + VERBOSE_FLAG := -v + endif +endif + +BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG) + # Extra CMake flags which extend the default set CMAKE_EXTRA_FLAGS ?= DEPS_CMAKE_FLAGS ?= @@ -30,7 +39,7 @@ SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE) all: nvim nvim: build/.ran-cmake deps - +$(BUILD_TOOL) -C build + +$(BUILD_CMD) -C build cmake: touch CMakeLists.txt @@ -42,7 +51,7 @@ build/.ran-cmake: | deps touch $@ deps: | .deps/build/third-party/.ran-cmake - +$(BUILD_TOOL) -C .deps/build/third-party + +$(BUILD_CMD) -C .deps/build/third-party .deps/build/third-party/.ran-cmake: mkdir -p .deps/build/third-party @@ -54,16 +63,16 @@ test: | nvim +$(SINGLE_MAKE) -C src/testdir unittest: | nvim - +$(BUILD_TOOL) -C build unittest + +$(BUILD_CMD) -C build unittest clean: - +test -d build && $(BUILD_TOOL) -C build clean || true + +test -d build && $(BUILD_CMD) -C build clean || true $(MAKE) -C src/testdir clean distclean: clean rm -rf .deps build install: | nvim - +$(BUILD_TOOL) -C build install + +$(BUILD_CMD) -C build install .PHONY: test unittest clean distclean nvim cmake deps install -- cgit