diff options
author | K.Takata <kentkt@csc.jp> | 2022-09-09 10:52:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-09 10:52:47 +0100 |
commit | 5bc13453b2dd8067597793e32c4f94aa3031054a (patch) | |
tree | 65ec7297bde790aaa686e0af77cb28d8aa50a393 /src | |
parent | c572ad508f53bd89aa29081fc583f17ef1f0f123 (diff) |
patch 9.0.0421: MS-Windows makefiles are inconsistently namedv9.0.0421
Problem: MS-Windows makefiles are inconsistently named.
Solution: Use consistent names. (Ken Takata, closes #11088)
Diffstat (limited to 'src')
-rw-r--r-- | src/GvimExt/Make_mvc.mak | 98 | ||||
-rw-r--r-- | src/GvimExt/Makefile | 100 | ||||
-rw-r--r-- | src/Make_cyg_ming.mak | 4 | ||||
-rw-r--r-- | src/Make_mvc.mak | 30 | ||||
-rw-r--r-- | src/tee/Make_ming.mak | 21 | ||||
-rw-r--r-- | src/tee/Makefile | 23 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 154 | ||||
-rw-r--r-- | src/testdir/Make_mvc.mak | 152 | ||||
-rw-r--r-- | src/testdir/README.txt | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
10 files changed, 299 insertions, 287 deletions
diff --git a/src/GvimExt/Make_mvc.mak b/src/GvimExt/Make_mvc.mak new file mode 100644 index 0000000000..4b83f52dd5 --- /dev/null +++ b/src/GvimExt/Make_mvc.mak @@ -0,0 +1,98 @@ +# Makefile for GvimExt, using MSVC +# Options: +# DEBUG=yes Build debug version (for VC7 and maybe later) +# CPUARG= /arch:IA32/AVX/etc, call from main makefile to set +# automatically from CPUNR +# + +TARGETOS = WINNT + +!ifndef APPVER +APPVER = 5.01 +!endif +!ifndef WINVER +WINVER = 0x0501 +!endif + +!if "$(DEBUG)" != "yes" +NODEBUG = 1 +!endif + +!ifdef PROCESSOR_ARCHITECTURE +# On Windows NT +! ifndef CPU +CPU = i386 +! if !defined(PLATFORM) && defined(TARGET_CPU) +PLATFORM = $(TARGET_CPU) +! endif +! ifdef PLATFORM +! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") +CPU = AMD64 +! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") +CPU = ARM64 +! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") +! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. +! endif +! endif +! endif +!else +CPU = i386 +!endif + +!ifdef SDK_INCLUDE_DIR +!include $(SDK_INCLUDE_DIR)\Win32.mak +!elseif "$(USE_WIN32MAK)"=="yes" +!include <Win32.mak> +!else +cc = cl +link = link +rc = rc +cflags = -nologo -c +lflags = -incremental:no -nologo +rcflags = /r +olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib +!endif + +# include CPUARG +cflags = $(cflags) $(CPUARG) + +# set WINVER and _WIN32_WINNT +cflags = $(cflags) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) + +!if "$(CL)" == "/D_USING_V110_SDK71_" +rcflags = $(rcflags) /D_USING_V110_SDK71_ +!endif + +SUBSYSTEM = console +!if "$(SUBSYSTEM_VER)" != "" +SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) +!endif + +!if "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64" +OFFSET = 0x11C000000 +!else +OFFSET = 0x1C000000 +!endif + +all: gvimext.dll + +gvimext.dll: gvimext.obj \ + gvimext.res + $(link) $(lflags) -dll -def:gvimext.def -base:$(OFFSET) -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) + if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2 + +gvimext.obj: gvimext.h + +.cpp.obj: + $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp + +gvimext.res: gvimext.rc + $(rc) /nologo $(rcflags) $(rcvars) gvimext.rc + +clean: + - if exist gvimext.dll del gvimext.dll + - if exist gvimext.lib del gvimext.lib + - if exist gvimext.exp del gvimext.exp + - if exist gvimext.obj del gvimext.obj + - if exist gvimext.res del gvimext.res + - if exist gvimext.dll.manifest del gvimext.dll.manifest diff --git a/src/GvimExt/Makefile b/src/GvimExt/Makefile index 4b83f52dd5..18b91ece29 100644 --- a/src/GvimExt/Makefile +++ b/src/GvimExt/Makefile @@ -1,98 +1,4 @@ -# Makefile for GvimExt, using MSVC -# Options: -# DEBUG=yes Build debug version (for VC7 and maybe later) -# CPUARG= /arch:IA32/AVX/etc, call from main makefile to set -# automatically from CPUNR -# +!message This makefile is deprecated. Use Make_mvc.mak instead. +!message -TARGETOS = WINNT - -!ifndef APPVER -APPVER = 5.01 -!endif -!ifndef WINVER -WINVER = 0x0501 -!endif - -!if "$(DEBUG)" != "yes" -NODEBUG = 1 -!endif - -!ifdef PROCESSOR_ARCHITECTURE -# On Windows NT -! ifndef CPU -CPU = i386 -! if !defined(PLATFORM) && defined(TARGET_CPU) -PLATFORM = $(TARGET_CPU) -! endif -! ifdef PLATFORM -! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") -CPU = AMD64 -! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") -CPU = ARM64 -! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") -! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. -! endif -! endif -! endif -!else -CPU = i386 -!endif - -!ifdef SDK_INCLUDE_DIR -!include $(SDK_INCLUDE_DIR)\Win32.mak -!elseif "$(USE_WIN32MAK)"=="yes" -!include <Win32.mak> -!else -cc = cl -link = link -rc = rc -cflags = -nologo -c -lflags = -incremental:no -nologo -rcflags = /r -olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib -!endif - -# include CPUARG -cflags = $(cflags) $(CPUARG) - -# set WINVER and _WIN32_WINNT -cflags = $(cflags) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) - -!if "$(CL)" == "/D_USING_V110_SDK71_" -rcflags = $(rcflags) /D_USING_V110_SDK71_ -!endif - -SUBSYSTEM = console -!if "$(SUBSYSTEM_VER)" != "" -SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) -!endif - -!if "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64" -OFFSET = 0x11C000000 -!else -OFFSET = 0x1C000000 -!endif - -all: gvimext.dll - -gvimext.dll: gvimext.obj \ - gvimext.res - $(link) $(lflags) -dll -def:gvimext.def -base:$(OFFSET) -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) - if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2 - -gvimext.obj: gvimext.h - -.cpp.obj: - $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp - -gvimext.res: gvimext.rc - $(rc) /nologo $(rcflags) $(rcvars) gvimext.rc - -clean: - - if exist gvimext.dll del gvimext.dll - - if exist gvimext.lib del gvimext.lib - - if exist gvimext.exp del gvimext.exp - - if exist gvimext.obj del gvimext.obj - - if exist gvimext.res del gvimext.res - - if exist gvimext.dll.manifest del gvimext.dll.manifest +!include Make_mvc.mak diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 9c004fa8d2..fe393fbeda 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -1149,7 +1149,7 @@ xxd/xxd.exe: xxd/xxd.c $(MAKE) -C xxd -f Make_ming.mak CC='$(CC)' tee/tee.exe: tee/tee.c - $(MAKE) -C tee CC='$(CC)' + $(MAKE) -C tee -f Make_ming.mak CC='$(CC)' GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS) @@ -1176,7 +1176,7 @@ ifdef MZSCHEME endif $(MAKE) -C GvimExt -f Make_ming.mak clean $(MAKE) -C xxd -f Make_ming.mak clean - $(MAKE) -C tee clean + $(MAKE) -C tee -f Make_ming.mak clean # Run vim script to generate the Ex command lookup table. # This only needs to be run when a command name has been added or changed. diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 52282cb1e7..7619fdbf00 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -1400,7 +1400,7 @@ tee/tee.exe: tee/tee.c GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h cd GvimExt - $(MAKE) /NOLOGO -f Makefile $(MAKEFLAGS_GVIMEXT) + $(MAKE) /NOLOGO -f Make_mvc.mak $(MAKEFLAGS_GVIMEXT) cd .. @@ -1441,7 +1441,7 @@ clean: testclean $(MAKE) /NOLOGO -f Make_mvc.mak clean cd .. cd GvimExt - $(MAKE) /NOLOGO -f Makefile clean + $(MAKE) /NOLOGO -f Make_mvc.mak clean cd .. # Run vim script to generate the Ex command lookup table. @@ -1463,27 +1463,27 @@ nvcmdidxs: nv_cmds.h test: cd testdir - $(MAKE) /NOLOGO -f Make_dos.mak + $(MAKE) /NOLOGO -f Make_mvc.mak cd .. testgvim testgui: cd testdir - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\gvim + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\gvim cd .. testtiny: cd testdir - $(MAKE) /NOLOGO -f Make_dos.mak tiny + $(MAKE) /NOLOGO -f Make_mvc.mak tiny cd .. testgvimtiny: cd testdir - $(MAKE) /NOLOGO -f Make_dos.mak tiny VIMPROG=..\gvim + $(MAKE) /NOLOGO -f Make_mvc.mak tiny VIMPROG=..\gvim cd .. testclean: cd testdir - $(MAKE) /NOLOGO -f Make_dos.mak clean + $(MAKE) /NOLOGO -f Make_mvc.mak clean cd .. # Run individual OLD style test. @@ -1491,8 +1491,8 @@ testclean: $(SCRIPTS_TINY): cd testdir - if exist $@.out del $@.out - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $@.out + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) nolog + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) $@.out @ if exist test.log ( type test.log & exit /b 1 ) cd .. @@ -1501,9 +1501,9 @@ $(SCRIPTS_TINY): $(NEW_TESTS): cd testdir - if exist $@.res del $@.res - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $@.res - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) nolog + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) $@.res + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) report cd .. # Run Vim9 tests. @@ -1511,9 +1511,9 @@ $(NEW_TESTS): test_vim9: cd testdir -del test_vim9_*.res - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $(TEST_VIM9_RES) - $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) nolog + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) $(TEST_VIM9_RES) + $(MAKE) /NOLOGO -f Make_mvc.mak VIMPROG=..\$(VIMTESTTARGET) report cd .. ########################################################################### diff --git a/src/tee/Make_ming.mak b/src/tee/Make_ming.mak new file mode 100644 index 0000000000..f6e91358fb --- /dev/null +++ b/src/tee/Make_ming.mak @@ -0,0 +1,21 @@ +# A very (if not the most) simplistic Makefile for MS-Windows and OS/2 + +CC=gcc +CFLAGS=-O2 -fno-strength-reduce + +ifneq (sh.exe, $(SHELL)) +DEL = rm -f +else +DEL = del +endif + +tee.exe: tee.o + $(CC) $(CFLAGS) -s -o $@ $< + +tee.o: tee.c + $(CC) $(CFLAGS) -c $< + +clean: + - $(DEL) tee.o + - $(DEL) tee.exe + diff --git a/src/tee/Makefile b/src/tee/Makefile index f6e91358fb..fe7777931d 100644 --- a/src/tee/Makefile +++ b/src/tee/Makefile @@ -1,21 +1,2 @@ -# A very (if not the most) simplistic Makefile for MS-Windows and OS/2 - -CC=gcc -CFLAGS=-O2 -fno-strength-reduce - -ifneq (sh.exe, $(SHELL)) -DEL = rm -f -else -DEL = del -endif - -tee.exe: tee.o - $(CC) $(CFLAGS) -s -o $@ $< - -tee.o: tee.c - $(CC) $(CFLAGS) -c $< - -clean: - - $(DEL) tee.o - - $(DEL) tee.exe - +$(warning This makefile is deprecated. Use Make_ming.mak instead.) +include Make_ming.mak diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index 9d1dc4ecc2..7f9d6bfb1c 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -1,152 +1,4 @@ -# -# Makefile to run all tests for Vim, on Dos-like machines. -# -# Requires a set of Unix tools: echo, diff, etc. +!message Make_dos.mak is deprecated. Use Make_mvc.mak instead. +!message -VIMPROG = ..\\vim - -default: nongui - -!include Make_all.mak - -# Explicit dependencies. -test_options.res test_alot.res: opt_test.vim - -TEST_OUTFILES = $(SCRIPTS_TINY_OUT) -DOSTMP = dostmp -DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test) -DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in) - -.SUFFIXES: .in .out .res .vim - -# Add --gui-dialog-file to avoid getting stuck in a dialog. -COMMON_ARGS = $(NO_INITS) --gui-dialog-file guidialog - -nongui: nolog tinytests newtests report - -gui: nolog tinytests newtests report - -tiny: nolog tinytests report - -benchmark: $(SCRIPTS_BENCH) - -report: - @rem without the +eval feature test_result.log is a copy of test.log - @if exist test.log ( copy /y test.log test_result.log > nul ) \ - else ( echo No failures reported > test_result.log ) - $(VIMPROG) -u NONE $(COMMON_ARGS) -S summarize.vim messages - @echo. - @echo Test results: - @cmd /c type test_result.log - @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \ - else ( echo ALL DONE ) - - -# Execute an individual new style test, e.g.: -# nmake -f Make_dos.mak test_largefile -$(NEW_TESTS): - -if exist $@.res del $@.res - -if exist test.log del test.log - -if exist messages del messages - @$(MAKE) -nologo -f Make_dos.mak $@.res VIMPROG=$(VIMPROG) - @type messages - @if exist test.log exit 1 - - -# Delete files that may interfere with running tests. This includes some files -# that may result from working on the tests, not only from running them. -clean: - -if exist *.out del *.out - -if exist *.failed del *.failed - -if exist *.res del *.res - -if exist $(DOSTMP) rd /s /q $(DOSTMP) - -if exist test.in del test.in - -if exist test.ok del test.ok - -if exist Xdir1 rd /s /q Xdir1 - -if exist Xfind rd /s /q Xfind - -if exist XfakeHOME rd /s /q XfakeHOME - -if exist X* del X* - -for /d %i in (X*) do @rd /s/q %i - -if exist viminfo del viminfo - -if exist test.log del test.log - -if exist test_result.log del test_result.log - -if exist messages del messages - -if exist benchmark.out del benchmark.out - -if exist opt_test.vim del opt_test.vim - -if exist guidialog del guidialog - -if exist guidialogfile del guidialogfile - -nolog: - -if exist test.log del test.log - -if exist test_result.log del test_result.log - -if exist messages del messages - - -# Tiny tests. Works even without the +eval feature. -tinytests: $(SCRIPTS_TINY_OUT) - -# Copy the input files to dostmp, changing the fileformat to dos. -$(DOSTMP_INFILES): $(*B).in - if not exist $(DOSTMP)\NUL md $(DOSTMP) - if exist $@ del $@ - $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $(*B).in - -# For each input file dostmp/test99.in run the tests. -# This moves test99.in to test99.in.bak temporarily. -$(TEST_OUTFILES): $(DOSTMP)\$(*B).in - -@if exist test.out DEL test.out - -@if exist $(DOSTMP)\$(*B).out DEL $(DOSTMP)\$(*B).out - move $(*B).in $(*B).in.bak > nul - copy $(DOSTMP)\$(*B).in $(*B).in > nul - copy $(*B).ok test.ok > nul - $(VIMPROG) -u dos.vim $(COMMON_ARGS) -s dotest.in $(*B).in - -@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul - -@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul - -@if exist test.ok del test.ok - -@if exist Xdir1 rd /s /q Xdir1 - -@if exist Xfind rd /s /q Xfind - -@if exist XfakeHOME rd /s /q XfakeHOME - -@del X* - -@if exist viminfo del viminfo - $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \ - $(DOSTMP)\$(*B).out - @diff test.out $*.ok & if errorlevel 1 \ - ( move /y test.out $*.failed > nul \ - & del $(DOSTMP)\$(*B).out \ - & echo $* FAILED >> test.log ) \ - else ( move /y test.out $*.out > nul ) - - -# New style of tests uses Vim script with assert calls. These are easier -# to write and a lot easier to read and debug. -# Limitation: Only works with the +eval feature. - -newtests: newtestssilent - @if exist messages type messages - -newtestssilent: $(NEW_TESTS_RES) - -.vim.res: - @echo $(VIMPROG) > vimcmd - $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim - @del vimcmd - -test_gui.res: test_gui.vim - @echo $(VIMPROG) > vimcmd - $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim - @del vimcmd - -test_gui_init.res: test_gui_init.vim - @echo $(VIMPROG) > vimcmd - $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim - @del vimcmd - -opt_test.vim: ../optiondefs.h gen_opt_test.vim - $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h - -test_bench_regexp.res: test_bench_regexp.vim - -if exist benchmark.out del benchmark.out - @echo $(VIMPROG) > vimcmd - $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim - @del vimcmd - @IF EXIST benchmark.out ( type benchmark.out ) +!include Make_mvc.mak diff --git a/src/testdir/Make_mvc.mak b/src/testdir/Make_mvc.mak new file mode 100644 index 0000000000..882c5d082f --- /dev/null +++ b/src/testdir/Make_mvc.mak @@ -0,0 +1,152 @@ +# +# Makefile to run all tests for Vim, on Dos-like machines. +# +# Requires a set of Unix tools: echo, diff, etc. + +VIMPROG = ..\\vim + +default: nongui + +!include Make_all.mak + +# Explicit dependencies. +test_options.res test_alot.res: opt_test.vim + +TEST_OUTFILES = $(SCRIPTS_TINY_OUT) +DOSTMP = dostmp +DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test) +DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in) + +.SUFFIXES: .in .out .res .vim + +# Add --gui-dialog-file to avoid getting stuck in a dialog. +COMMON_ARGS = $(NO_INITS) --gui-dialog-file guidialog + +nongui: nolog tinytests newtests report + +gui: nolog tinytests newtests report + +tiny: nolog tinytests report + +benchmark: $(SCRIPTS_BENCH) + +report: + @rem without the +eval feature test_result.log is a copy of test.log + @if exist test.log ( copy /y test.log test_result.log > nul ) \ + else ( echo No failures reported > test_result.log ) + $(VIMPROG) -u NONE $(COMMON_ARGS) -S summarize.vim messages + @echo. + @echo Test results: + @cmd /c type test_result.log + @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \ + else ( echo ALL DONE ) + + +# Execute an individual new style test, e.g.: +# nmake -f Make_mvc.mak test_largefile +$(NEW_TESTS): + -if exist $@.res del $@.res + -if exist test.log del test.log + -if exist messages del messages + @$(MAKE) -nologo -f Make_mvc.mak $@.res VIMPROG=$(VIMPROG) + @type messages + @if exist test.log exit 1 + + +# Delete files that may interfere with running tests. This includes some files +# that may result from working on the tests, not only from running them. +clean: + -if exist *.out del *.out + -if exist *.failed del *.failed + -if exist *.res del *.res + -if exist $(DOSTMP) rd /s /q $(DOSTMP) + -if exist test.in del test.in + -if exist test.ok del test.ok + -if exist Xdir1 rd /s /q Xdir1 + -if exist Xfind rd /s /q Xfind + -if exist XfakeHOME rd /s /q XfakeHOME + -if exist X* del X* + -for /d %i in (X*) do @rd /s/q %i + -if exist viminfo del viminfo + -if exist test.log del test.log + -if exist test_result.log del test_result.log + -if exist messages del messages + -if exist benchmark.out del benchmark.out + -if exist opt_test.vim del opt_test.vim + -if exist guidialog del guidialog + -if exist guidialogfile del guidialogfile + +nolog: + -if exist test.log del test.log + -if exist test_result.log del test_result.log + -if exist messages del messages + + +# Tiny tests. Works even without the +eval feature. +tinytests: $(SCRIPTS_TINY_OUT) + +# Copy the input files to dostmp, changing the fileformat to dos. +$(DOSTMP_INFILES): $(*B).in + if not exist $(DOSTMP)\NUL md $(DOSTMP) + if exist $@ del $@ + $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $(*B).in + +# For each input file dostmp/test99.in run the tests. +# This moves test99.in to test99.in.bak temporarily. +$(TEST_OUTFILES): $(DOSTMP)\$(*B).in + -@if exist test.out DEL test.out + -@if exist $(DOSTMP)\$(*B).out DEL $(DOSTMP)\$(*B).out + move $(*B).in $(*B).in.bak > nul + copy $(DOSTMP)\$(*B).in $(*B).in > nul + copy $(*B).ok test.ok > nul + $(VIMPROG) -u dos.vim $(COMMON_ARGS) -s dotest.in $(*B).in + -@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul + -@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul + -@if exist test.ok del test.ok + -@if exist Xdir1 rd /s /q Xdir1 + -@if exist Xfind rd /s /q Xfind + -@if exist XfakeHOME rd /s /q XfakeHOME + -@del X* + -@if exist viminfo del viminfo + $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \ + $(DOSTMP)\$(*B).out + @diff test.out $*.ok & if errorlevel 1 \ + ( move /y test.out $*.failed > nul \ + & del $(DOSTMP)\$(*B).out \ + & echo $* FAILED >> test.log ) \ + else ( move /y test.out $*.out > nul ) + + +# New style of tests uses Vim script with assert calls. These are easier +# to write and a lot easier to read and debug. +# Limitation: Only works with the +eval feature. + +newtests: newtestssilent + @if exist messages type messages + +newtestssilent: $(NEW_TESTS_RES) + +.vim.res: + @echo $(VIMPROG) > vimcmd + $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim + @del vimcmd + +test_gui.res: test_gui.vim + @echo $(VIMPROG) > vimcmd + $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim + @del vimcmd + +test_gui_init.res: test_gui_init.vim + @echo $(VIMPROG) > vimcmd + $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim + @del vimcmd + +opt_test.vim: ../optiondefs.h gen_opt_test.vim + $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h + +test_bench_regexp.res: test_bench_regexp.vim + -if exist benchmark.out del benchmark.out + @echo $(VIMPROG) > vimcmd + $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim + @del vimcmd + @IF EXIST benchmark.out ( type benchmark.out ) diff --git a/src/testdir/README.txt b/src/testdir/README.txt index b8bc52f1e6..f72bdbfb85 100644 --- a/src/testdir/README.txt +++ b/src/testdir/README.txt @@ -106,7 +106,7 @@ tests are successful, then this file will be an empty file. - To run the test on MS-Windows using the MSVC nmake: - > nmake -f Make_dos.mak + > nmake -f Make_mvc.mak - To run the tests with GUI Vim: diff --git a/src/version.c b/src/version.c index cfebf04d75..c232a7b62f 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 421, +/**/ 420, /**/ 419, |