1# 2# Makefile to run all tests for Vim, on Dos-like machines 3# with sh.exe or zsh.exe in the path or not. 4# 5# Author: Bill McCarthy 6# 7# Note that test54 has been removed until it is fixed. 8# 9# Requires a set of Unix tools: echo, diff, etc. 10 11ifneq (sh.exe, $(SHELL)) 12DEL = rm -f 13MV = mv 14CP = cp 15CAT = cat 16DIRSLASH = / 17else 18DEL = del 19MV = rename 20CP = copy 21CAT = type 22DIRSLASH = \\ 23endif 24 25VIMPROG = ..$(DIRSLASH)vim 26 27default: vimall 28 29include Make_all.mak 30 31# Omitted: 32# test2 "\\tmp" doesn't work. 33# test10 'errorformat' is different 34# test12 can't unlink a swap file 35# test25 uses symbolic link 36# test27 can't edit file with "*" in file name 37# test54 doesn't work yet 38# test97 \{ and \$ are not escaped characters 39 40SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4) $(SCRIPTS_WIN32) 41 42SCRIPTS_BENCH = bench_re_freeze.out 43 44# Must run test1 first to create small.vim. 45$(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS): $(SCRIPTS_FIRST) 46 47.SUFFIXES: .in .out 48 49vimall: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) 50 echo ALL DONE 51 52nongui: fixff $(SCRIPTS_FIRST) $(SCRIPTS) 53 echo ALL DONE 54 55benchmark: $(SCRIPTS_BENCH) 56 57small: 58 echo ALL DONE 59 60gui: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) 61 echo ALL DONE 62 63win32: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) 64 echo ALL DONE 65 66fixff: 67 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok 68 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \ 69 dotest.in test60.ok test71.ok test74.ok test_listchars.ok 70 71clean: 72 -$(DEL) *.out 73 -$(DEL) test.ok 74 -$(DEL) small.vim 75 -$(DEL) tiny.vim 76 -$(DEL) mbyte.vim 77 -$(DEL) mzscheme.vim 78 -$(DEL) lua.vim 79 -$(DEL) X* 80 -$(DEL) viminfo 81 82.in.out: 83 $(CP) $*.ok test.ok 84 $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in 85 diff test.out $*.ok 86 -$(DEL) $*.out 87 $(MV) test.out $*.out 88 -$(DEL) X* 89 -$(DEL) test.ok 90 -$(DEL) viminfo 91 92bench_re_freeze.out: bench_re_freeze.vim 93 -$(DEL) benchmark.out 94 $(VIMPROG) -u dos.vim -U NONE --noplugin $*.in 95 $(CAT) benchmark.out 96