aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-12-02 17:18:37 +0100
committerGitHub <noreply@github.com>2019-12-02 17:18:37 +0100
commit0b7a7b23cce8c9eeeaac1a38190fd49e1033625c (patch)
treedc5383dc3ebc9d10f493eda7effac935a6f86ff5 /Makefile
parent7d66a02b888e4055c62e6f477bc36b6ce760336b (diff)
downloadrneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.tar.gz
rneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.tar.bz2
rneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.zip
oldtest: support for running by filename (#11473)
Follow-up to 8969efca8 (Vim patch 8.1.0723) NOTE: This changes the main entrypoint for running single oldtest files to not use/require the ".res" extension anymore. But it is handled for B/C. Adds a phony rule to run oldtest by filename. Not going through "$(MAKE)" avoids GNUmakefile being used then (which I use for WIP things), and it seems like SINGLE_MAKE should be used anyway probably.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c3b5ed80f8..07dad26d7b 100644
--- a/Makefile
+++ b/Makefile
@@ -119,8 +119,13 @@ oldtest: | nvim build/runtime/doc/tags
ifeq ($(strip $(TEST_FILE)),)
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES)
else
- +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" SCRIPTS= $(MAKEOVERRIDES) $(TEST_FILE)
+ @# Handle TEST_FILE=test_foo{,.res,.vim}.
+ +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
endif
+# Build oldtest by specifying the relative .vim filename.
+.PHONY: phony_force
+src/nvim/testdir/%.vim: phony_force
+ +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" SCRIPTS= $(MAKEOVERRIDES) $(patsubst src/nvim/testdir/%.vim,%,$@)
build/runtime/doc/tags helptags: | nvim
+$(BUILD_CMD) -C build runtime/doc/tags
@@ -201,10 +206,10 @@ lint: check-single-includes clint lualint _opt_pylint _opt_shlint
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
# Does not work with "Unix Makefiles".
ifeq ($(BUILD_TYPE),Ninja)
-build/%:
+build/%: phony_force
$(BUILD_CMD) -C build $(patsubst build/%,%,$@)
-$(DEPS_BUILD_DIR)/%:
+$(DEPS_BUILD_DIR)/%: phony_force
$(BUILD_CMD) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
endif