mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
patch 9.0.0421: MS-Windows makefiles are inconsistently named
Problem: MS-Windows makefiles are inconsistently named. Solution: Use consistent names. (Ken Takata, closes #11088)
This commit is contained in:
@ -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
|
||||
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -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%
|
||||
|
11
Filelist
11
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 = \
|
||||
|
98
src/GvimExt/Make_mvc.mak
Normal file
98
src/GvimExt/Make_mvc.mak
Normal file
@ -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
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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 ..
|
||||
|
||||
###########################################################################
|
||||
|
21
src/tee/Make_ming.mak
Normal file
21
src/tee/Make_ming.mak
Normal file
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
152
src/testdir/Make_mvc.mak
Normal file
152
src/testdir/Make_mvc.mak
Normal file
@ -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 )
|
@ -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:
|
||||
|
||||
|
@ -703,6 +703,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
421,
|
||||
/**/
|
||||
420,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user