diff Makefile @ 15176:ea6f7b224be7 v8.1.0598

patch 8.1.0598: indent tests may use the wrong Vim binary commit https://github.com/vim/vim/commit/72846cfa76fb7e566c49282410163ed0840c91db Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 15 17:23:18 2018 +0100 patch 8.1.0598: indent tests may use the wrong Vim binary Problem: Indent tests may use the wrong Vim binary. Solution: Pass in the just built Vim binary.
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Dec 2018 17:30:04 +0100
parents 963c1967f917
children fada746a971b
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -39,10 +39,18 @@ all install uninstall tools config confi
 	@echo "Starting make in the src directory."
 	@echo "If there are problems, cd to the src directory and run make there"
 	cd src && $(MAKE) $@
+	# When the target is "test" also run the indent tests.
+	@if test "$@" = "test"; then \
+		$(MAKE) indenttest; \
+	fi
 
-test: all
-	cd src && $(MAKE) test
-	cd runtime/indent && $(MAKE) clean && $(MAKE) test
+# Executable used for running the indent tests.
+VIM_FOR_INDENTTEST = ../../src/vim
+
+indenttest:
+	cd runtime/indent && \
+		$(MAKE) clean VIM="$(VIM_FOR_INDENTTEST)" && \
+		$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
 		
 
 #########################################################################