]> granicus.if.org Git - vim/commitdiff
patch 9.0.0421: MS-Windows makefiles are inconsistently named v9.0.0421
authorK.Takata <kentkt@csc.jp>
Fri, 9 Sep 2022 09:52:47 +0000 (10:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Sep 2022 09:52:47 +0000 (10:52 +0100)
Problem:    MS-Windows makefiles are inconsistently named.
Solution:   Use consistent names. (Ken Takata, closes #11088)

13 files changed:
.appveyor.yml
.github/workflows/ci.yml
Filelist
src/GvimExt/Make_mvc.mak [new file with mode: 0644]
src/GvimExt/Makefile
src/Make_cyg_ming.mak
src/Make_mvc.mak
src/tee/Make_ming.mak [new file with mode: 0644]
src/tee/Makefile
src/testdir/Make_dos.mak
src/testdir/Make_mvc.mak [new file with mode: 0644]
src/testdir/README.txt
src/version.c

index 80f8e38f0b02fa5b2ea192a31df166413c36dde7..866725f0b152f8773bda29c27c88cbe7975618cc 100644 (file)
@@ -26,9 +26,9 @@ test_script:
   - cd src/testdir
     # Testing with MSVC gvim
   - path C:\Python35-x64;%PATH%
-  - nmake -f Make_dos.mak VIMPROG=..\gvim
-  - nmake -f Make_dos.mak clean
+  - nmake -f Make_mvc.mak VIMPROG=..\gvim
+  - nmake -f Make_mvc.mak clean
     # Testing with MSVC console version
-  - nmake -f Make_dos.mak VIMPROG=..\vim
+  - nmake -f Make_mvc.mak VIMPROG=..\vim
 
 # vim: sw=2 sts=2 et ts=8 sr
index e4f234a41a9137d02f0084c9588e33a3e4877723..05e675de811039542e30508978d6e258fd233c09 100644 (file)
@@ -563,11 +563,11 @@ jobs:
           call "%VCVARSALL%" ${{ matrix.vcarch }}
 
           echo %COL_GREEN%Start testing Vim in background.%COL_RESET%
-          start cmd /c "cd src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
+          start cmd /c "cd src2\testdir & nmake -nologo -f Make_mvc.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
 
           echo %COL_GREEN%Test gVim:%COL_RESET%
           cd src\testdir
-          nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
+          nmake -nologo -f Make_mvc.mak VIMPROG=..\gvim || exit 1
 
       - name: Show the result of testing Vim
         shell: cmd
@@ -590,7 +590,7 @@ jobs:
           echo %COL_GREEN%The result of testing Vim:%COL_RESET%
           cd src2\testdir
           if exist messages type messages
-          nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
+          nmake -nologo -f Make_mvc.mak report VIMPROG=..\..\src\vim || exit 1
 
           if "%timeout%"=="1" (
             echo %COL_RED%Timed out.%COL_RESET%
index d601a7ff9934e75ff824bda35d7dcb87ae103941..519964b61d5c83ce00e24c3ce499354e07b28194 100644 (file)
--- a/Filelist
+++ b/Filelist
@@ -171,7 +171,6 @@ SRC_ALL =   \
                src/viminfo.c \
                src/winclip.c \
                src/window.c \
-               src/tee/tee.c \
                src/xxd/xxd.c \
                src/testdir/gen_opt_test.vim \
                src/testdir/README.txt \
@@ -487,7 +486,6 @@ SRC_UNIX =  \
                src/vimtutor \
                src/gvimtutor \
                src/which.sh \
-               src/tee/Makefile \
                src/xxd/Makefile \
 
 # source files for both DOS and Unix
@@ -516,7 +514,7 @@ SRC_DOS_UNIX =      \
                src/proto/if_tcl.pro \
                src/typemap \
 
-# source files for DOS (also in the extra archive)
+# source files for MS-Windows (also in the extra archive)
 SRC_DOS =      \
                src/GvimExt/*.mak \
                src/GvimExt/GvimExt.reg \
@@ -570,6 +568,7 @@ SRC_DOS =   \
                src/proto/os_win32.pro \
                src/proto/os_mswin.pro \
                src/testdir/Make_dos.mak \
+               src/testdir/Make_mvc.mak \
                src/testdir/Make_ming.mak \
                src/testdir/dos.vim \
                src/uninstall.c \
@@ -578,7 +577,10 @@ SRC_DOS =  \
                src/vimrun.c \
                src/xpm_w32.c \
                src/xpm_w32.h \
+               src/tee/Make_ming.mak \
                src/tee/Make_mvc.mak \
+               src/tee/Makefile \
+               src/tee/tee.c \
                src/xxd/Make_ming.mak \
                src/xxd/Make_mvc.mak \
                nsis/gvim.nsi \
@@ -945,9 +947,6 @@ EXTRA =             \
                README_extra.txt \
                src/VisVim/VisVim.dll \
                runtime/vimlogo.xpm \
-               src/tee/Makefile \
-               src/tee/Make_mvc.mak \
-               src/tee/tee.c \
 
 # files in READMEdir that are included from the top dir
 IN_README_DIR = \
diff --git a/src/GvimExt/Make_mvc.mak b/src/GvimExt/Make_mvc.mak
new file mode 100644 (file)
index 0000000..4b83f52
--- /dev/null
@@ -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
index 4b83f52dd5e4e7c9967166eeb663ffee9e6ed4ea..18b91ece29fce78803b168c780ecf441f8484c5f 100644 (file)
@@ -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
index 9c004fa8d209453471df352f60827c5629778e82..fe393fbedafbb0ca6c5b1453fbd49776e4422285 100644 (file)
@@ -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.
index 52282cb1e77c65bba17beb2a3623af4cdb153f54..7619fdbf00346f26d05cb19867b7c03b47fd0be6 100644 (file)
@@ -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 (file)
index 0000000..f6e9135
--- /dev/null
@@ -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
+
index f6e91358fbf90d4aa9123f27d2532940c61160f3..fe7777931d5eedddbd269d8070dad1fb6ad9b00f 100644 (file)
@@ -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
index 9d1dc4ecc20f119bdd4722456036dc03886d42de..7f9d6bfb1c85afbb0ab8615a152f320e4ac0fca9 100644 (file)
@@ -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 (file)
index 0000000..882c5d0
--- /dev/null
@@ -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 )
index b8bc52f1e65130a000193238c60d6ecaeb9c0ce6..f72bdbfb85748f4c14a8fb9a2ff9a4b894ea1e10 100644 (file)
@@ -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:
 
index cfebf04d757c88b7eb4f3dc97d912b633548c61e..c232a7b62ffa1e08e679b5b9f73778366ca66896 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    421,
 /**/
     420,
 /**/