diff options
author | Daniel Hahler <git@thequod.de> | 2019-12-02 17:18:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 17:18:37 +0100 |
commit | 0b7a7b23cce8c9eeeaac1a38190fd49e1033625c (patch) | |
tree | dc5383dc3ebc9d10f493eda7effac935a6f86ff5 /Makefile | |
parent | 7d66a02b888e4055c62e6f477bc36b6ce760336b (diff) | |
download | rneovim-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-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |