patch 9.1.1675: MS-Windows: Makefiles can be refactored Commit: https://github.com/vim/vim/commit/e34bdb844fb68fe9250ec91ee70a14b8ec4d230c Author: RestorerZ <resto...@mail2k.ru> Date: Sat Aug 23 17:00:17 2025 +0200
patch 9.1.1675: MS-Windows: Makefiles can be refactored Problem: MS-Windows: Makefiles can be refactored Solution: Refactor using a common tools.mak, make some style changes (RestorerZ). closes: #18060 Signed-off-by: RestorerZ <resto...@mail2k.ru> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/Filelist b/Filelist index 413a88b65..e97e17ec0 100644 --- a/Filelist +++ b/Filelist @@ -569,6 +569,7 @@ SRC_DOS_UNIX = \ # Source files for MS Windows (also in the extra archive). SRC_DOS = \ + src/auto/nmake/tools.mak \ src/GvimExt/*.mak \ src/GvimExt/GvimExt.reg \ src/GvimExt/Makefile \ diff --git a/nsis/Make_mvc.mak b/nsis/Make_mvc.mak index 8350082b2..143b5edaa 100644 --- a/nsis/Make_mvc.mak +++ b/nsis/Make_mvc.mak @@ -1,10 +1,59 @@ # # Makefile for MS Windows for create self-installing exe of Vim. -# 05/04/2024, Restorer resto...@mail2k.ru +# 2024鈥�05, Restorer, resto...@mail2k.ru # -#!INCLUDE .\Make_all.mak +# included common tools +!INCLUDE ..\src uto make ools.mak + +# Read MAJOR and MINOR from version.h. +!IFNDEF MAJOR +! IF ![for /F "tokens=3" %G in \ + ('findstr /RC:"VIM_VERSION_MAJOR[ ^]*[0-9^]" ..\src ersion.h') \ + do @(echo:MAJOR=%G>> .\_major.tmp)] +! INCLUDE .\_major.tmp +! IF [$(RM) .\_major.tmp] +! ENDIF +! ELSE +MAJOR = 9 +! ENDIF +!ENDIF + +!IFNDEF MINOR +! IF ![for /F "tokens=3" %G in \ + ('findstr /RC:"VIM_VERSION_MINOR[ ^]*[0-9^]" ..\src ersion.h') \ + do @(echo:MINOR=%G>> .\_minor.tmp)] +! INCLUDE .\_minor.tmp +! IF [$(RM) .\_minor.tmp] +! ENDIF +! ELSE +MINOR = 1 +! ENDIF +!ENDIF + +# Read PATCHLEVEL from version.c +!IFNDEF PATCHLEVEL +! IF ![for /F %G in \ + ('findstr /NBLC:"static int included_patches" ..\src ersion.c \ + ^| (set /p "_t=" ^& set /a _t+=2 ^)') do \ + @$(CMD) $(CMDFLAGS) "for /F "skip=%G delims=, " %H in \ + (..\src ersion.c) do (echo:PATCHLEVEL=%H> .\_patchlvl.tmp & exit /b)"] +! INCLUDE .\_patchlvl.tmp +! IF [$(RM) .\_patchlvl.tmp] +! ENDIF +! ELSE +PATCHLEVEL = 0 +! ENDIF +!ENDIF + +!IF $(PATCHLEVEL) < 10 +PATCHLEVEL = 000$(PATCHLEVEL) +!ELSEIF $(PATCHLEVEL) < 100 +PATCHLEVEL = 00$(PATCHLEVEL) +!ELSEIF $(PATCHLEVEL) < 1000 +PATCHLEVEL = 0$(PATCHLEVEL) +!ENDIF .SUFFIXES : @@ -60,49 +109,15 @@ XX = /X"$(X:;=" /X")" # If necessary, correct the full path of the NSIS compiler in the next line. # Please do not enclose the path in quotation marks. -MKNSIS = $(ProgFiles)\NSIS - -PS = powershell.exe -RM = del /f /q -RD = rmdir /s /q +MKNSIS = $(ProgFiles)\NSIS\makensis.exe MKNSISFLAGS = /INPUTCHARSET UTF8 $(MKNSISFLAGS) -PSFLAGS = -NoLogo -NoProfile -Command - -# Read MAJOR and MINOR from version.h. -!IF ![for /F "tokens=2,3" %G in ( \ - 'findstr /rc:"VIM_VERSION_MINOR[ ^]*[0-9^]" \ - /rc:"VIM_VERSION_MAJOR[ ^]*[0-9^]" ..\src ersion.h') do \ - @if "VIM_VERSION_MAJOR"=="%G" (echo MAJOR=%H>>_ver.tmp) \ - else echo MINOR=%H>>_ver.tmp] -! INCLUDE .\_ver.tmp -! IF [$(RM) .\_ver.tmp] -! ENDIF -!ENDIF - -# Read PATCHLEVEL from version.c -!IF ![for /F %G in ( \ - 'findstr /nblc:"static int included_patches[^]" ..\src ersion.c \ - ^| (set /p "_t=" ^& set /a _t+=2 ^)') do \ - @cmd /q /c "for /F "skip=%G delims=, " %H in (..\src ersion.c) do \ - (echo PATCH=%H>_patchlvl.tmp & exit /b)"] -! INCLUDE .\_patchlvl.tmp -! IF [$(RM) .\_patchlvl.tmp] -! ENDIF -!ENDIF -!IF $(PATCH) < 10 -PATCH = 000$(PATCH) -!ELSEIF $(PATCH) < 100 -PATCH = 00$(PATCH) -!ELSEIF $(PATCH) < 1000 -PATCH = 0$(PATCH) -!ENDIF all : makeinst makeinst : prepare - ^"$(MKNSIS)\makensis.exe" $(MKNSISFLAGS) gvim.nsi $(XX) + ^"$(MKNSIS)" $(MKNSISFLAGS) gvim.nsi $(XX) prepare : unzipicons gvim_version.nsh license rename @@ -110,7 +125,8 @@ unzipicons : icons.zip @ if exist %|fF ul $(RD) %|fF @ $(PS) $(PSFLAGS) \ Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; \ - [System.IO.Compression.ZipFile]::ExtractToDirectory(\"$**\", \".\") + [System.IO.Compression.ZipFile]::ExtractToDirectory(\"$**\", \ + \".\") gvim_version.nsh : Make_mvc.mak @ 1> $@ echo:^# Generated from Makefile: define the version numbers @@ -118,7 +134,7 @@ gvim_version.nsh : Make_mvc.mak @ 1>> $@ echo:^!define __GVIM_VER__NSH__ @ 1>> $@ echo:^!define VER_MAJOR $(MAJOR) @ 1>> $@ echo:^!define VER_MINOR $(MINOR) - @ 1>> $@ echo:^!define PATCHLEVEL $(PATCH) + @ 1>> $@ echo:^!define PATCHLEVEL $(PATCHLEVEL) @ 1>> $@ echo:^!endif license : ..\lang\LICENSE.*.txt ..\LICENSE @@ -135,4 +151,4 @@ clean : @ if exist .\icons ul $(RD) .\icons @ if exist .\gvim??.exe $(RM) .\gvim??.exe -# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: +# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=79 ft=make: diff --git a/runtime/doc/Make_mvc.mak b/runtime/doc/Make_mvc.mak index 064aa3ebf..8dc09a35f 100644 --- a/runtime/doc/Make_mvc.mak +++ b/runtime/doc/Make_mvc.mak @@ -1,16 +1,20 @@ # # Makefile for the Vim documentation on Windows # -# 20.03.24, Restorer, <resto...@mail2k.ru> +# 2024-03-20, Restorer, <resto...@mail2k.ru> +# + +# included common tools +!INCLUDE ..\..\src uto make ools.mak # Common components -!INCLUDE Make_all.mak +!INCLUDE .\Make_all.mak # TODO: to think about what to use instead of awk. PowerShell? #AWK = -# Correct the following line for the where executable file vim is installed. +# Correct the following line for the where executable file Vim is installed. # Please do not put the path in quotes. VIMPROG = ..\..\src im.exe @@ -18,16 +22,6 @@ VIMPROG = ..\..\src im.exe # Please do not put the path in quotes. ICONV_PATH = D:\Programs\GetText in -# In case some package like GnuWin32, UnixUtils -# or something similar is installed on the system. -# If the "touch" program is installed on the system, but it is not registered -# in the %PATH% environment variable, then specify the full path to this file. -!IF EXIST ("touch.exe") -TOUCH = touch.exe %1 -!ELSE -TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 ) -!ENDIF - # In case some package like GnuWin32, UnixUtils, gettext # or something similar is installed on the system. # If the "iconv" program is installed on the system, but it is not registered @@ -38,11 +32,6 @@ ICONV = iconv.exe ICONV = "$(ICONV_PATH)\iconv.exe" !ENDIF -RM = del /q -PS = PowerShell.exe - -PSFLAGS = -NoLogo -NoProfile -Command - .SUFFIXES : .SUFFIXES : .c .o .txt .html @@ -53,7 +42,8 @@ all : tags perlhtml $(CONVERTED) tags : doctags $(DOCS) doctags.exe $(DOCS) | sort /L C /O tags $(PS) $(PSFLAGS) \ - (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"}) \ + (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ \ + -replace \"`r\", \"\"}) \ ^| New-Item -Path . -Name tags -ItemType file -Force doctags : doctags.c @@ -63,7 +53,7 @@ doctags : doctags.c # Use Vim to generate the tags file. Can only be used when Vim has been # compiled and installed. Supports multiple languages. vimtags : $(DOCS) - @"$(VIMPROG)" --clean -esX -V1 -u doctags.vim + @ "$(VIMPROG)" --clean -esX -V1 -u doctags.vim # TODO: #html: noerrors tags $(HTMLS) @@ -104,99 +94,96 @@ clean : arabic.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << farsi.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << hebrew.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << russian.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << gui_w32.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << if_ole.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_390.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_amiga.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_beos.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_dos.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_haiku.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_mac.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_mint.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_msdos.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_os2.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_qnx.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_risc.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << os_win32.txt : - <<touch.bat $@ + @ <<touch.bat $@ @$(TOUCH) << convert-all : $(CONVERTED) -!IF [$(PS) $(PSFLAGS) "exit $$psversiontable.psversion.major"] == 2 -!ERROR The program "PowerShell" version 3.0 or higher is required to work -!ENDIF vim-da.UTF-8.1 : vim-da.1 !IF DEFINED (ICONV) @@ -204,8 +191,9 @@ vim-da.UTF-8.1 : vim-da.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-da.UTF-8.1 : vimdiff-da.1 @@ -214,8 +202,9 @@ vimdiff-da.UTF-8.1 : vimdiff-da.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-da.UTF-8.1 : vimtutor-da.1 @@ -224,8 +213,9 @@ vimtutor-da.UTF-8.1 : vimtutor-da.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-de.UTF-8.1 : vim-de.1 @@ -234,8 +224,9 @@ vim-de.UTF-8.1 : vim-de.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF evim-fr.UTF-8.1 : evim-fr.1 @@ -244,8 +235,9 @@ evim-fr.UTF-8.1 : evim-fr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-fr.UTF-8.1 : vim-fr.1 @@ -254,8 +246,9 @@ vim-fr.UTF-8.1 : vim-fr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-fr.UTF-8.1 : vimdiff-fr.1 @@ -264,8 +257,9 @@ vimdiff-fr.UTF-8.1 : vimdiff-fr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-fr.UTF-8.1 : vimtutor-fr.1 @@ -274,8 +268,9 @@ vimtutor-fr.UTF-8.1 : vimtutor-fr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF xxd-fr.UTF-8.1 : xxd-fr.1 @@ -284,8 +279,9 @@ xxd-fr.UTF-8.1 : xxd-fr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF evim-it.UTF-8.1 : evim-it.1 @@ -294,8 +290,9 @@ evim-it.UTF-8.1 : evim-it.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-it.UTF-8.1 : vim-it.1 @@ -304,8 +301,9 @@ vim-it.UTF-8.1 : vim-it.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-it.UTF-8.1 : vimdiff-it.1 @@ -314,8 +312,9 @@ vimdiff-it.UTF-8.1 : vimdiff-it.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-it.UTF-8.1 : vimtutor-it.1 @@ -324,8 +323,9 @@ vimtutor-it.UTF-8.1 : vimtutor-it.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF xxd-it.UTF-8.1 : xxd-it.1 @@ -334,8 +334,9 @@ xxd-it.UTF-8.1 : xxd-it.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28591)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF evim-pl.UTF-8.1 : evim-pl.1 @@ -344,8 +345,9 @@ evim-pl.UTF-8.1 : evim-pl.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28592)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-pl.UTF-8.1 : vim-pl.1 @@ -354,8 +356,9 @@ vim-pl.UTF-8.1 : vim-pl.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28592)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-pl.UTF-8.1 : vimdiff-pl.1 @@ -364,8 +367,9 @@ vimdiff-pl.UTF-8.1 : vimdiff-pl.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28592)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-pl.UTF-8.1 : vimtutor-pl.1 @@ -374,8 +378,9 @@ vimtutor-pl.UTF-8.1 : vimtutor-pl.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28592)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF xxd-pl.UTF-8.1 : xxd-pl.1 @@ -384,8 +389,9 @@ xxd-pl.UTF-8.1 : xxd-pl.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28592)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF evim-ru.UTF-8.1 : evim-ru.1 @@ -394,8 +400,9 @@ evim-ru.UTF-8.1 : evim-ru.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(20866)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-ru.UTF-8.1 : vim-ru.1 @@ -404,8 +411,9 @@ vim-ru.UTF-8.1 : vim-ru.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(20866)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-ru.UTF-8.1 : vimdiff-ru.1 @@ -414,8 +422,9 @@ vimdiff-ru.UTF-8.1 : vimdiff-ru.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(20866)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-ru.UTF-8.1 : vimtutor-ru.1 @@ -424,8 +433,9 @@ vimtutor-ru.UTF-8.1 : vimtutor-ru.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(20866)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF xxd-ru.UTF-8.1 : xxd-ru.1 @@ -434,8 +444,9 @@ xxd-ru.UTF-8.1 : xxd-ru.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(20866)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF evim-tr.UTF-8.1 : evim-tr.1 @@ -444,8 +455,9 @@ evim-tr.UTF-8.1 : evim-tr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28599)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vim-tr.UTF-8.1 : vim-tr.1 @@ -454,8 +466,9 @@ vim-tr.UTF-8.1 : vim-tr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28599)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimdiff-tr.UTF-8.1 : vimdiff-tr.1 @@ -464,8 +477,9 @@ vimdiff-tr.UTF-8.1 : vimdiff-tr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28599)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF vimtutor-tr.UTF-8.1 : vimtutor-tr.1 @@ -474,8 +488,9 @@ vimtutor-tr.UTF-8.1 : vimtutor-tr.1 !ELSE # Conversion to UTF-8 encoding without BOM and with UNIX-like line ending $(PS) $(PSFLAGS) \ - [IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ + [IO.File]::ReadAllText(\"$?\", \ + [Text.Encoding]::GetEncoding(28599)) ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force !ENDIF -# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: +# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=79 ft=make: diff --git a/runtime/indent/Make_mvc.mak b/runtime/indent/Make_mvc.mak index a50494d8c..44f80f74f 100644 --- a/runtime/indent/Make_mvc.mak +++ b/runtime/indent/Make_mvc.mak @@ -1,10 +1,17 @@ +# # Makefile for running indent tests on OS Windows. # Made on the base of a indent/Makefile. -# Restorer, 13.03.2024 +# 2024-03-13, Restorer +# + +# included common tools +!INCLUDE ..\..\src uto make ools.mak + +LSFLAGS = /A:-D /B /O:N /L /S .SUFFIXES: -VIMPROG = vim.exe +VIMPROG = ..\..\src im.exe VIMRUNTIME = .. # Run the tests that didn't run yet or failed previously. @@ -12,10 +19,22 @@ VIMRUNTIME = .. # If a test fails a testdir\*.fail file will be written. test : @ set "VIMRUNTIME=$(VIMRUNTIME)" - $(VIMPROG) --clean --not-a-term -u testdir untest.vim - + @ $(VIMPROG) --clean --not-a-term -u testdir untest.vim && \ + (echo:&echo: INDENT TESTS: DONE &echo:) || \ + <<echofail.bat +set "retval=%ERRORLEVEL%" +@echo off +echo:&echo: INDENT TESTS: FAILED +for /F %%G in ('2^> nul $(LS) $(LSFLAGS) testdir\*.fail') do ( +call set "fail=%%fail%% %%G") +if defined fail ( +for %%G in (%fail%) do @(echo:&echo: %%~nxG:&echo: && type %%G) +) +exit /B %retval% +<< clean testclean : - @ if exist testdir\*.fail del /q testdir\*.fail - @ if exist testdir\*.out del /q testdir\*.out + @ if exist testdir\*.fail $(RM) testdir\*.fail + @ if exist testdir\*.out $(RM) testdir\*.out +# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=79 ft=make: diff --git a/runtime/lang/Make_mvc.mak b/runtime/lang/Make_mvc.mak index c8647181b..4f08a8cd6 100644 --- a/runtime/lang/Make_mvc.mak +++ b/runtime/lang/Make_mvc.mak @@ -1,14 +1,14 @@ # # Makefile for converted the Vim menu files on Windows # -# 08.11.23, Restorer, <resto...@mail2k.ru> +# 2023-11-08, Restorer, <resto...@mail2k.ru> +# -!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2 -!ERROR The program "PowerShell" version 3.0 or higher is required to work -!ENDIF +# included common tools +!INCLUDE ..\..\src uto make ools.mak # Common components -!INCLUDE Make_all.mak +!INCLUDE .\Make_all.mak # Correct the following line for the directory where iconv is installed. # Please do not put the path in quotes. @@ -24,17 +24,11 @@ ICONV = "iconv.exe" ICONV = "$(ICONV_PATH)\iconv.exe" !ENDIF -RM = del /q -PS = PowerShell.exe - -PSFLAGS = -NoLogo -NoProfile -Command - - all : $(CONVERTED) -# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim. +# Convert menu_zh_cn.utf-8.vim to menu_chinese_gb.936.vim. menu_chinese_gb.936.vim : menu_zh_cn.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP936 $? >$@ !ELSE @@ -46,13 +40,13 @@ menu_chinese_gb.936.vim : menu_zh_cn.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(936)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp936' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(936)) -# Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim. +# Convert menu_zh_tw.utf-8.vim to menu_chinese_taiwan.950.vim. menu_chinese_taiwan.950.vim : menu_zh_tw.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP950 $? >$@ !ELSE @@ -64,13 +58,13 @@ menu_chinese_taiwan.950.vim : menu_zh_tw.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(950)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp950' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(950)) -# Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim. +# Convert menu_cs_cz.utf-8.vim to menu_cs_cz.iso_8859-2.vim. menu_cs_cz.iso_8859-2.vim : menu_cs_cz.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@ !ELSE @@ -81,15 +75,15 @@ menu_cs_cz.iso_8859-2.vim : menu_cs_cz.utf-8.vim !ENDIF $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28592)) -replace \ - ' Czech \(UTF-8\)', ' Czech (ISO-8859-2)' -replace \ - \"scriptencoding utf-8\", \"scriptencoding iso-8859-2\" -replace \ - \" Original translations\", \" Generated from $?, DO NOT EDIT\"; \ + 'Czech \(UTF-8\)', 'Czech (ISO-8859-2)' -replace \ + 'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim. +# Convert menu_cs_cz.utf-8.vim to menu_czech_czech_republic.1250.vim. menu_czech_czech_republic.1250.vim : menu_cs_cz.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1250 $? >$@ !ELSE @@ -100,35 +94,41 @@ menu_czech_czech_republic.1250.vim : menu_cs_cz.utf-8.vim !ENDIF $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1250)) -replace \ - ' Czech \(UTF-8\)', ' Czech (CP1250)' -replace \ - \"scriptencoding utf-8\", \"scriptencoding cp1250\" -replace \ - \" Original translations\", \" Generated from $?, DO NOT EDIT\"; \ + 'Czech \(UTF-8\)', 'Czech (CP1250)' -replace \ + 'scriptencoding utf-8', 'scriptencoding cp1250' -replace \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1250)) -# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim. +# Convert menu_cs_cz.utf-8.vim to menu_czech_czech_republic.ascii.vim. menu_czech_czech_republic.ascii.vim : menu_cs_cz.utf-8.vim - -$(RM) $@ + - $(RM) $@ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \ [System.Text.Encoding]::GetEncoding(65001)) -replace \ 'scriptencoding utf-8', 'scriptencoding latin1' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT' -replace \ - 'Czech \(UTF-8\)', 'Czech (ASCII - without diacritics)' -creplace \ - [char]193, 'A' -creplace [char]225, 'a' -creplace [char]268, 'C' -creplace \ - [char]269, 'c' -creplace [char]270, 'D' -creplace [char]271, 'd' -creplace \ - [char]201, 'E' -creplace [char]233, 'e' -creplace [char]282, 'E' -creplace \ - [char]283, 'e' -creplace [char]205, 'I' -creplace [char]237, 'i' -creplace \ - [char]327, 'N' -creplace [char]328, 'n' -creplace [char]211, 'O' -creplace \ - [char]243, 'o' -creplace [char]344, 'R' -creplace [char]345, 'r' -creplace \ - [char]352, 'S' -creplace [char]353, 's' -creplace [char]356, 'T' -creplace \ - [char]357, 't' -creplace [char]218, 'U' -creplace [char]250, 'u' -creplace \ - [char]366, 'U' -creplace [char]367, 'u' -creplace [char]221, 'Y' -creplace \ - [char]253, 'y' -creplace [char]381, 'Z' -creplace [char]382, 'z' ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ - -# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim. + 'Original translations', 'Generated from $?, DO NOT EDIT' \ + -replace 'Czech \(UTF-8\)', \ + 'Czech (ASCII - without diacritics)' \ + -creplace [char]193, 'A' -creplace [char]225, 'a' \ + -creplace [char]268, 'C' -creplace [char]269, 'c' \ + -creplace [char]270, 'D' -creplace [char]271, 'd' \ + -creplace [char]201, 'E' -creplace [char]233, 'e' \ + -creplace [char]282, 'E' -creplace [char]283, 'e' \ + -creplace [char]205, 'I' -creplace [char]237, 'i' \ + -creplace [char]327, 'N' -creplace [char]328, 'n' \ + -creplace [char]211, 'O' -creplace [char]243, 'o' \ + -creplace [char]344, 'R' -creplace [char]345, 'r' \ + -creplace [char]352, 'S' -creplace [char]353, 's' \ + -creplace [char]356, 'T' -creplace [char]357, 't' \ + -creplace [char]218, 'U' -creplace [char]250, 'u' \ + -creplace [char]366, 'U' -creplace [char]367, 'u' \ + -creplace [char]221, 'Y' -creplace [char]253, 'y' \ + -creplace [char]381, 'Z' -creplace [char]382, 'z' \ + ^| 1>nul New-Item -Path . -Name $@ -ItemType file -Force + +# Convert menu_hu_hu.utf-8.vim to menu_hu_hu.iso_8859-2.vim. menu_hu_hu.iso_8859-2.vim : menu_hu_hu.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@ !ELSE @@ -140,13 +140,13 @@ menu_hu_hu.iso_8859-2.vim : menu_hu_hu.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28592)) -replace \ 'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim. +# Convert menu_ja_jp.utf-8.vim to menu_ja_jp.euc-jp.vim. menu_ja_jp.euc-jp.vim : menu_ja_jp.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t EUC-JP $? >$@ !ELSE @@ -159,13 +159,13 @@ menu_ja_jp.euc-jp.vim : menu_ja_jp.utf-8.vim [System.Text.Encoding]::GetEncoding(51932)) -replace \ 'Japanese \(UTF-8\)', 'Japanese (EUC-JP)' -replace \ 'scriptencoding utf-8', 'scriptencoding euc-jp' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(51932)) -# Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim. +# Convert menu_ja_jp.utf-8.vim to menu_japanese_japan.932.vim. menu_japanese_japan.932.vim : menu_ja_jp.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP932 $? >$@ !ELSE @@ -178,13 +178,13 @@ menu_japanese_japan.932.vim : menu_ja_jp.utf-8.vim [System.Text.Encoding]::GetEncoding(932)) -replace \ 'Japanese \(UTF-8\)', 'Japanese (CP932)' -replace \ 'scriptencoding utf-8', 'scriptencoding cp932' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(932)) -# Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim. +# Convert menu_ko_kr.utf-8.vim to menu_ko_kr.euckr.vim. menu_ko_kr.euckr.vim : menu_ko_kr.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t EUC-KR $? >$@ !ELSE @@ -196,13 +196,13 @@ menu_ko_kr.euckr.vim : menu_ko_kr.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(51949)) -replace \ 'scriptencoding utf-8', 'scriptencoding euc-kr' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(51949)) -# Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim. +# Convert menu_pl_pl.utf-8.vim to menu_pl_pl.iso_8859-2.vim. menu_pl_pl.iso_8859-2.vim : menu_pl_pl.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@ !ELSE @@ -214,13 +214,13 @@ menu_pl_pl.iso_8859-2.vim : menu_pl_pl.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28592)) -replace \ 'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim. +# Convert menu_pl_pl.utf-8.vim to menu_polish_poland.1250.vim. menu_polish_poland.1250.vim : menu_pl_pl.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1250 $? >$@ !ELSE @@ -232,13 +232,13 @@ menu_polish_poland.1250.vim : menu_pl_pl.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1250)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp1250' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1250)) -# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim. +# Convert menu_ru_ru.utf-8.vim to menu_ru_ru.cp1251.vim. menu_ru_ru.cp1251.vim : menu_ru_ru.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1251 $? >$@ !ELSE @@ -250,13 +250,13 @@ menu_ru_ru.cp1251.vim : menu_ru_ru.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1251)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp1251' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1251)) -# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim. +# Convert menu_ru_ru.utf-8.vim to menu_ru_ru.koi8-r.vim. menu_ru_ru.koi8-r.vim : menu_ru_ru.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t KOI8-R $? >$@ !ELSE @@ -268,13 +268,13 @@ menu_ru_ru.koi8-r.vim : menu_ru_ru.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(20866)) -replace \ 'scriptencoding utf-8', 'scriptencoding koi8-r' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(20866)) -# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim. +# Convert menu_slovak_slovak_republic.1250.vim to menu_sk_sk.iso_8859-2.vim. menu_sk_sk.iso_8859-2.vim : menu_slovak_slovak_republic.1250.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f CP1250 -t ISO-8859-2 $? >$@ !ELSE @@ -286,13 +286,13 @@ menu_sk_sk.iso_8859-2.vim : menu_slovak_slovak_republic.1250.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28592)) -replace \ 'scriptencoding cp1250', 'scriptencoding iso-8859-2' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim. +# Convert menu_sl_si.utf-8.vim to menu_sl_si.cp1250.vim. menu_sl_si.cp1250.vim : menu_sl_si.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1250 $? >$@ !ELSE @@ -304,13 +304,13 @@ menu_sl_si.cp1250.vim : menu_sl_si.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1250)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp1250' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1250)) -# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim. +# Convert menu_sl_si.utf-8.vim to menu_sl_si.latin2.vim. menu_sl_si.latin2.vim : menu_sl_si.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@ !ELSE @@ -322,71 +322,93 @@ menu_sl_si.latin2.vim : menu_sl_si.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28592)) -replace \ 'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim. +# Convert menu_sr_rs.utf-8.vim to menu_sr_rs.ascii.vim. menu_sr_rs.ascii.vim : menu_sr_rs.utf-8.vim - -$(RM) $@ + - $(RM) $@ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \ [System.Text.Encoding]::GetEncoding(65001)) -replace \ 'scriptencoding utf-8', 'scriptencoding latin1' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT' -creplace \ - [char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \ - [char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, 'dj' -creplace \ - [char]1077, 'e' -creplace [char]1078, 'z' -creplace [char]1079, 'z' -creplace \ - [char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \ - [char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \ - [char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \ - [char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \ - [char]1090, 't' -creplace [char]1115, 'c' -creplace [char]1091, 'u' -creplace \ - [char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \ - [char]1095, 'c' -creplace [char]1119, 'dz' -creplace [char]1096, 's' -creplace \ - [char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \ - [char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, '膼' -creplace \ - [char]1045, 'E' -creplace [char]1046, 'Z' -creplace [char]1047, 'Z' -creplace \ - [char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \ - [char]1051, 'L' -creplace [char]1033, 'Lj' -creplace [char]1052, 'M' -creplace \ - [char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \ - [char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \ - [char]1058, 'T' -creplace [char]1035, 'C' -creplace [char]1059, 'U' -creplace \ - [char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \ - [char]1063, 'C' -creplace [char]1039, 'Dz' -creplace [char]1064, 'S' ^| \ - 1>nul New-Item -Force -Path . -ItemType file -Name $@ - -# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim. + 'Original translations', 'Generated from $?, DO NOT EDIT' \ + -creplace [char]1072, 'a' -creplace [char]1073, 'b' \ + -creplace [char]1074, 'v' -creplace [char]1075, 'g' \ + -creplace [char]1076, 'd' -creplace [char]1106, 'dj' \ + -creplace [char]1077, 'e' -creplace [char]1078, 'z' \ + -creplace [char]1079, 'z' -creplace [char]1080, 'i' \ + -creplace [char]1112, 'j' -creplace [char]1082, 'k' \ + -creplace [char]1083, 'l' -creplace [char]1113, 'lj' \ + -creplace [char]1084, 'm' -creplace [char]1085, 'n' \ + -creplace [char]1114, 'nj' -creplace [char]1086, 'o' \ + -creplace [char]1087, 'p' -creplace [char]1088, 'r' \ + -creplace [char]1089, 's' -creplace [char]1090, 't' \ + -creplace [char]1115, 'c' -creplace [char]1091, 'u' \ + -creplace [char]1092, 'f' -creplace [char]1093, 'h' \ + -creplace [char]1094, 'c' -creplace [char]1095, 'c' \ + -creplace [char]1119, 'dz' -creplace [char]1096, 's' \ + -creplace [char]1040, 'A' -creplace [char]1041, 'B' \ + -creplace [char]1042, 'V' -creplace [char]1043, 'G' \ + -creplace [char]1044, 'D' -creplace [char]1026, '膼' \ + -creplace [char]1045, 'E' -creplace [char]1046, 'Z' \ + -creplace [char]1047, 'Z' -creplace [char]1048, 'I' \ + -creplace [char]1032, 'J' -creplace [char]1050, 'K' \ + -creplace [char]1051, 'L' -creplace [char]1033, 'Lj' \ + -creplace [char]1052, 'M' -creplace [char]1053, 'N' \ + -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' \ + -creplace [char]1055, 'P' -creplace [char]1056, 'R' \ + -creplace [char]1057, 'S' -creplace [char]1058, 'T' \ + -creplace [char]1035, 'C' -creplace [char]1059, 'U' \ + -creplace [char]1060, 'F' -creplace [char]1061, 'H' \ + -creplace [char]1062, 'C' -creplace [char]1063, 'C' \ + -creplace [char]1039, 'Dz' -creplace [char]1064, 'S' ^| \ + 1>nul New-Item -Path . -Name $@ -ItemType file -Force + +# Convert menu_sr_rs.utf-8.vim to menu_sr_rs.iso_8859-2.vim. menu_sr_rs.iso_8859-2.vim : menu_sr_rs.utf-8.vim - -$(RM) $@ + - $(RM) $@ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$?\", \ - [System.Text.Encoding]::GetEncoding(65001)) -creplace \ - [char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \ - [char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, [char]273 -creplace \ - [char]1077, 'e' -creplace [char]1078, [char]382 -creplace [char]1079, 'z' -creplace \ - [char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \ - [char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \ - [char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \ - [char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \ - [char]1090, 't' -creplace [char]1115, [char]263 -creplace [char]1091, 'u' -creplace \ - [char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \ - [char]1095, [char]269 -creplace [char]1119, 'dz' -creplace [char]1096, [char]353 -creplace \ - [char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \ - [char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, '膼' -creplace \ - [char]1045, 'E' -creplace [char]1046, [char]381 -creplace [char]1047, 'Z' -creplace \ - [char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \ - [char]1051, 'L' -creplace [char]1033, 'Lj'-creplace [char]1052, 'M' -creplace \ - [char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \ - [char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \ - [char]1058, 'T' -creplace [char]1035, [char]262 -creplace [char]1059, 'U' -creplace \ - [char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \ - [char]1063, [char]268 -creplace [char]1039, 'Dz' -creplace [char]1064, [char]352 -replace \ - 'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ - [System.IO.File]::WriteAllText(\"$@\", $$out, [System.Text.Encoding]::GetEncoding(28592)) + [System.Text.Encoding]::GetEncoding(65001)) \ + -creplace [char]1072, 'a' -creplace [char]1073, 'b' \ + -creplace [char]1074, 'v' -creplace [char]1075, 'g' \ + -creplace [char]1076, 'd' -creplace [char]1106, [char]273 \ + -creplace [char]1077, 'e' -creplace [char]1078, [char]382 \ + -creplace [char]1079, 'z' -creplace [char]1080, 'i' \ + -creplace [char]1112, 'j' -creplace [char]1082, 'k' \ + -creplace [char]1083, 'l' -creplace [char]1113, 'lj' \ + -creplace [char]1084, 'm' -creplace [char]1085, 'n' \ + -creplace [char]1114, 'nj' -creplace [char]1086, 'o' \ + -creplace [char]1087, 'p' -creplace [char]1088, 'r' \ + -creplace [char]1089, 's' -creplace [char]1090, 't' \ + -creplace [char]1115, [char]263 -creplace [char]1091, 'u' \ + -creplace [char]1092, 'f' -creplace [char]1093, 'h' \ + -creplace [char]1094, 'c' -creplace [char]1095, [char]269 \ + -creplace [char]1119, 'dz' -creplace [char]1096, [char]353 \ + -creplace [char]1040, 'A' -creplace [char]1041, 'B' \ + -creplace [char]1042, 'V' -creplace [char]1043, 'G' \ + -creplace [char]1044, 'D' -creplace [char]1026, '膼' \ + -creplace [char]1045, 'E' -creplace [char]1046, [char]381 \ + -creplace [char]1047, 'Z' -creplace [char]1048, 'I' \ + -creplace [char]1032, 'J' -creplace [char]1050, 'K' \ + -creplace [char]1051, 'L' -creplace [char]1033, 'Lj'\ + -creplace [char]1052, 'M' -creplace [char]1053, 'N' \ + -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' \ + -creplace [char]1055, 'P' -creplace [char]1056, 'R' \ + -creplace [char]1057, 'S' -creplace [char]1058, 'T' \ + -creplace [char]1035, [char]262 -creplace [char]1059, 'U' \ + -creplace [char]1060, 'F' -creplace [char]1061, 'H' \ + -creplace [char]1062, 'C' -creplace [char]1063, [char]268 \ + -creplace [char]1039, 'Dz' -creplace [char]1064, [char]352 \ + -replace 'scriptencoding utf-8', 'scriptencoding iso-8859-2' \ + -replace \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ + [System.IO.File]::WriteAllText(\"$@\", $$out, \ + [System.Text.Encoding]::GetEncoding(28592)) -# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim. +# Convert menu_sr_rs.utf-8.vim to menu_sr_rs.iso_8859-5.vim. menu_sr_rs.iso_8859-5.vim : menu_sr_rs.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-5 $? >$@ !ELSE @@ -398,13 +420,13 @@ menu_sr_rs.iso_8859-5.vim : menu_sr_rs.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28595)) -replace \ 'scriptencoding utf-8', 'scriptencoding iso-8859-5' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28595)) -# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim. +# Convert menu_tr_tr.utf-8.vim to menu_tr_tr.cp1254.vim. menu_tr_tr.cp1254.vim : menu_tr_tr.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1254 $? >$@ !ELSE @@ -416,13 +438,13 @@ menu_tr_tr.cp1254.vim : menu_tr_tr.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1254)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp1254' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1254)) -# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim. +# Convert menu_tr_tr.utf-8.vim to menu_tr_tr.iso_8859-9.vim. menu_tr_tr.iso_8859-9.vim : menu_tr_tr.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@ !ELSE @@ -434,13 +456,13 @@ menu_tr_tr.iso_8859-9.vim : menu_tr_tr.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(28599)) -replace \ 'scriptencoding utf-8', 'scriptencoding iso-8859-9' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(28599)) -# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim. +# Convert menu_uk_ua.utf-8.vim to menu_uk_ua.cp1251.vim. menu_uk_ua.cp1251.vim : menu_uk_ua.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t CP1251 $? >$@ !ELSE @@ -452,13 +474,13 @@ menu_uk_ua.cp1251.vim : menu_uk_ua.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(1251)) -replace \ 'scriptencoding utf-8', 'scriptencoding cp1251' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(1251)) -# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim. +# Convert menu_uk_ua.utf-8.vim to menu_uk_ua.koi8-u.vim. menu_uk_ua.koi8-u.vim : menu_uk_ua.utf-8.vim - -$(RM) $@ + - $(RM) $@ !IF DEFINED (ICONV) $(ICONV) -f UTF-8 -t KOI8-U $? >$@ !ELSE @@ -470,11 +492,11 @@ menu_uk_ua.koi8-u.vim : menu_uk_ua.utf-8.vim $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \ [System.Text.Encoding]::GetEncoding(21866)) -replace \ 'scriptencoding utf-8', 'scriptencoding koi8-u' -replace \ - ' Original translations', ' Generated from $?, DO NOT EDIT'; \ + 'Original translations', 'Generated from $?, DO NOT EDIT'; \ [System.IO.File]::WriteAllText(\"$@\", $$out, \ [System.Text.Encoding]::GetEncoding(21866)) clean : - @for %%G in ($(CONVERTED)) do (if exist .\%%G ($(RM) %%G)) + @ for %%G in ($(CONVERTED)) do @(if exist .\%%G $(RM) %%G) -# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: +# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=79 ft=make: diff --git a/src/GvimExt/Make_mvc.mak b/src/GvimExt/Make_mvc.mak index 132a584ba..874b34c74 100644 --- a/src/GvimExt/Make_mvc.mak +++ b/src/GvimExt/Make_mvc.mak @@ -5,45 +5,48 @@ # automatically from CPUNR # +# included common tools +!INCLUDE .. uto make ools.mak + TARGETOS = WINNT -!ifndef APPVER +!IFNDEF APPVER APPVER = 6.01 -!endif +!ENDIF # Set the default $(WINVER) to make it work with Windows 7. -!ifndef WINVER +!IFNDEF WINVER WINVER = 0x0601 -!endif +!ENDIF -!if "$(DEBUG)" != "yes" +!IF "$(DEBUG)" != "yes" NODEBUG = 1 -!endif +!ENDIF -!ifndef CPU +!IFNDEF CPU CPU = i386 -! ifndef PLATFORM -! ifdef TARGET_CPU +! IFNDEF PLATFORM +! IFDEF TARGET_CPU PLATFORM = $(TARGET_CPU) -! elseif defined(VSCMD_ARG_TGT_ARCH) +! ELSEIF defined(VSCMD_ARG_TGT_ARCH) PLATFORM = $(VSCMD_ARG_TGT_ARCH) -! endif -! endif -! ifdef PLATFORM -! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") +! ENDIF +! ENDIF +! IFDEF PLATFORM +! IF ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") CPU = AMD64 -! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") +! ELSEIF ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") CPU = ARM64 -! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") -! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. -! endif -! endif -!endif - -!ifdef SDK_INCLUDE_DIR -! include $(SDK_INCLUDE_DIR)\Win32.mak -!elseif "$(USE_WIN32MAK)"=="yes" -! include <Win32.mak> -!else +! ELSEIF ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") +! ERROR *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. +! ENDIF +! ENDIF +!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 @@ -51,7 +54,7 @@ cflags = -nologo -c lflags = -incremental:no -nologo rcflags = /r olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib -!endif +!ENDIF # include CPUARG cflags = $(cflags) $(CPUARG) @@ -59,26 +62,27 @@ cflags = $(cflags) $(CPUARG) # set WINVER and _WIN32_WINNT cflags = $(cflags) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) -!if "$(CL)" == "/D_USING_V110_SDK71_" +!IF "$(CL)" == "/D_USING_V110_SDK71_" rcflags = $(rcflags) /D_USING_V110_SDK71_ -!endif +!ENDIF SUBSYSTEM = console -!if "$(SUBSYSTEM_VER)" != "" +!IF "$(SUBSYSTEM_VER)" != "" SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) -!endif +!ENDIF -!if "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64" +!IF "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64" OFFSET = 0x11C000000 -!else +!ELSE OFFSET = 0x1C000000 -!endif +!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) +gvimext.dll: gvimext.obj gvimext.res + $(link) $(lflags) -dll -def:gvimext.def -base:$(OFFSET) \ + -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib \ + -subsystem:$(SUBSYSTEM) gvimext.obj: gvimext.h @@ -86,11 +90,13 @@ gvimext.obj: gvimext.h $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp gvimext.res: gvimext.rc - $(rc) /nologo $(rcflags) $(rcvars) 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 $(RM) gvimext.dll + - if exist gvimext.lib $(RM) gvimext.lib + - if exist gvimext.exp $(RM) gvimext.exp + - if exist gvimext.obj $(RM) gvimext.obj + - if exist gvimext.res $(RM) gvimext.res + +# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=79 ft=make: diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 383344d46..ba0f51257 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -61,8 +61,8 @@ # MZSCHEME=[Path to MzScheme directory] # DYNAMIC_MZSCHEME=yes (to load the MzScheme DLLs dynamically) # MZSCHEME_VER=[MzScheme version] (default is 3m_a0solc (6.6)) -# Used for the DLL file name. E.g.: -# C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll +# Used for the DLL file name. E.g.: +# C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll # MZSCHEME_DEBUG=no # # Perl interface: @@ -87,7 +87,7 @@ # DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically) # RUBY_VER=[Ruby version, eg 19, 22] (default is 22) # RUBY_API_VER_LONG=[Ruby API version, eg 1.9.1, 2.2.0] -# (default is 2.2.0) +# (default is 2.2.0) # You must set RUBY_API_VER_LONG when change RUBY_VER. # Note: If you use Ruby 1.9.3, set as follows: # RUBY_VER=19 @@ -162,223 +162,216 @@ # you can set DEFINES on the command line, e.g., # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS" -RM = del /f /q +# included common tools +!INCLUDE . uto make ools.mak # Read MAJOR and MINOR from version.h. -!IF ![for /f "tokens=2,3" %I in (version.h) do \ - @if "%I"=="VIM_VERSION_MAJOR" ( \ - echo MAJOR=%J> .\major.tmp \ - ) else if "%I"=="VIM_VERSION_MINOR" ( \ - echo MINOR=%J> .\minor.tmp && exit \ - )] -!ENDIF - -!IF EXIST(.\major.tmp) -! INCLUDE .\major.tmp -! IF [$(RM) .\major.tmp] +!IFNDEF MAJOR +! IF ![for /F "tokens=3" %G in \ + ('findstr /RC:"VIM_VERSION_MAJOR[ ^]*[0-9^]" . ersion.h') \ + do @(echo:MAJOR=%G> .\_major.tmp)] +! INCLUDE .\_major.tmp +! IF [$(RM) .\_major.tmp] +! ENDIF +! ELSE +MAJOR = 9 ! ENDIF -!ELSE -# Change this value for the new version -MAJOR = 9 !ENDIF -!IF EXIST(.\minor.tmp) -! INCLUDE .\minor.tmp -! IF [$(RM) .\minor.tmp] -! ENDIF -!ELSE -# Change this value for the new version -MINOR = 1 -!ENDIF - -# Read PATCHLEVEL from version.c. -!IF ![cmd.exe /V:ON /Q /C "set LINE=0&& set FIND=0&& \ - for /f "tokens=1,3 delims=, " %I in (version.c) do ( \ - set /A LINE+=1 > NUL && \ - if "%J"=="included_patches[^]" ( \ - set /A FIND=LINE+3 > NUL \ - ) else if "!LINE!"=="!FIND!" ( \ - echo PATCHLEVEL=%I> .\patchlvl.tmp && exit \ - ) \ - )"] -!ENDIF -!IF EXIST(.\patchlvl.tmp) -! INCLUDE .\patchlvl.tmp -! IF [$(RM) .\patchlvl.tmp] +!IFNDEF MINOR +! IF ![for /F "tokens=3" %G in \ + ('findstr /RC:"VIM_VERSION_MINOR[ ^]*[0-9^]" . ersion.h') \ + do @(echo:MINOR=%G> .\_minor.tmp)] +! INCLUDE .\_minor.tmp +! IF [$(RM) .\_minor.tmp] +! ENDIF +! ELSE +MINOR = 1 ! ENDIF !ENDIF -!IFDEF PATCHLEVEL -RCFLAGS = -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) +# Read PATCHLEVEL from version.c +!IFNDEF PATCHLEVEL +! IF ![for /F %G in \ + ('findstr /NBLC:"static int included_patches" . ersion.c \ + ^| (set /p "_t=" ^& set /a _t+=2 ^)') do \ + @$(CMD) $(CMDFLAGS) "for /F "skip=%G delims=, " %H in \ + (. ersion.c) do (echo:PATCHLEVEL=%H> .\_patchlvl.tmp & exit /b)"] +! INCLUDE .\_patchlvl.tmp +! IF [$(RM) .\_patchlvl.tmp] +! ENDIF +! ELSE +PATCHLEVEL = 0 +! ENDIF !ENDIF -!message Vim version: $(MAJOR).$(MINOR).$(PATCHLEVEL) +!MESSAGE Vim version: $(MAJOR).$(MINOR).$(PATCHLEVEL) -!if "$(VIMDLL)" == "yes" +!IF "$(VIMDLL)" == "yes" GUI = yes -!endif +!ENDIF -!ifndef DIRECTX +!IFNDEF DIRECTX DIRECTX = $(GUI) -!endif +!ENDIF # Select a code directory, depends on GUI, OLE, DEBUG, interfaces and etc. # If you change something else, do "make clean" first! -!if "$(VIMDLL)" == "yes" +!IF "$(VIMDLL)" == "yes" OBJDIR = .\ObjD -!elseif "$(GUI)" == "yes" +!ELSEIF "$(GUI)" == "yes" OBJDIR = .\ObjG -!else +!ELSE OBJDIR = .\ObjC -!endif -!if "$(DIRECTX)" == "yes" && "$(GUI)" == "yes" +!ENDIF +!IF "$(DIRECTX)" == "yes" && "$(GUI)" == "yes" OBJDIR = $(OBJDIR)X -!endif -!if "$(OLE)" == "yes" +!ENDIF +!IF "$(OLE)" == "yes" OBJDIR = $(OBJDIR)O -!endif -!ifdef LUA +!ENDIF +!IFDEF LUA OBJDIR = $(OBJDIR)U -!endif -!ifdef PERL +!ENDIF +!IFDEF PERL OBJDIR = $(OBJDIR)L -!endif -!ifdef PYTHON +!ENDIF +!IFDEF PYTHON OBJDIR = $(OBJDIR)Y -!endif -!ifdef PYTHON3 +!ENDIF +!IFDEF PYTHON3 OBJDIR = $(OBJDIR)H -!endif -!ifdef TCL +!ENDIF +!IFDEF TCL OBJDIR = $(OBJDIR)T -!endif -!ifdef RUBY +!ENDIF +!IFDEF RUBY OBJDIR = $(OBJDIR)R -!endif -!ifdef MZSCHEME +!ENDIF +!IFDEF MZSCHEME OBJDIR = $(OBJDIR)Z -!endif -!ifdef USE_MSVCRT +!ENDIF +!IFDEF USE_MSVCRT OBJDIR = $(OBJDIR)V -!endif -!if "$(DEBUG)" == "yes" +!ENDIF +!IF "$(DEBUG)" == "yes" OBJDIR = $(OBJDIR)d -!endif +!ENDIF -!ifdef CPU -! if "$(CPU)" == "I386" +!IFDEF CPU +! IF "$(CPU)" == "I386" CPU = i386 -! endif -!else # !CPU +! ENDIF +!ELSE # !CPU CPU = i386 -! ifndef PLATFORM -! ifdef TARGET_CPU +! IFNDEF PLATFORM +! IFDEF TARGET_CPU PLATFORM = $(TARGET_CPU) -! elseif defined(VSCMD_ARG_TGT_ARCH) +! ELSEIF defined(VSCMD_ARG_TGT_ARCH) PLATFORM = $(VSCMD_ARG_TGT_ARCH) -! endif -! endif -! ifdef PLATFORM -! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") +! ENDIF +! ENDIF +! IFDEF PLATFORM +! IF ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") CPU = AMD64 -! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") +! ELSEIF ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") CPU = ARM64 -! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") -! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. -! endif -! endif # !PLATFORM -!endif +! ELSEIF ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") +! ERROR *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. +! ENDIF +! ENDIF # !PLATFORM +!ENDIF OBJDIR = $(OBJDIR)$(CPU) # Build a retail version by default -!if "$(DEBUG)" != "yes" +!IF "$(DEBUG)" != "yes" NODEBUG = 1 -!else -! undef NODEBUG +!ELSE +! UNDEF NODEBUG MAKEFLAGS_GVIMEXT = DEBUG=yes -!endif +!ENDIF LINK = link # Check VC version. -!if [echo MSVCVER=_MSC_VER> msvcver.c && \ +!IF [echo MSVCVER=_MSC_VER> msvcver.c && \ echo MSVC_FULL=_MSC_FULL_VER>> msvcver.c && \ $(CC) /EP msvcver.c > msvcver.~ 2> nul] -! message *** ERROR -! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. -! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. -! error Make aborted. -!else -! include msvcver.~ -! if [del msvcver.c msvcver.~] -! endif -!endif - -!if $(MSVCVER) < 1900 -! message *** ERROR -! message Unsupported MSVC version. -! message Please use Visual C++ 2015 or later. -! error Make aborted. -!endif +! MESSAGE *** ERROR +! MESSAGE Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. +! MESSAGE This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. +! ERROR Make aborted. +!ELSE +! INCLUDE msvcver.~ +! IF [$(RM) msvcver.c msvcver.~] +! ENDIF +!ENDIF + +!IF $(MSVCVER) < 1900 +! MESSAGE *** ERROR +! MESSAGE Unsupported MSVC version. +! MESSAGE Please use Visual C++ 2015 or later. +! ERROR Make aborted. +!ENDIF MSVC_MAJOR = ($(MSVCVER) / 100 - 5) MSVCRT_VER = ($(MSVCVER) / 100 * 10 - 50) # Calculate MSVCRT_VER -!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0 -! include msvcrtver.~ -! if [del msvcrtver.~] -! endif -!endif +!IF [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0 +! INCLUDE msvcrtver.~ +! IF [$(RM) msvcrtver.~] +! ENDIF +!ENDIF # Show the versions (for debugging). -#!message _MSC_VER=$(MSVCVER) -#!message _MSC_FULL_VER=$(MSVC_FULL) -#!message MSVCRT_VER=$(MSVCRT_VER) +#!MESSAGE _MSC_VER=$(MSVCVER) +#!MESSAGE _MSC_FULL_VER=$(MSVC_FULL) +#!MESSAGE MSVCRT_VER=$(MSVCRT_VER) # Base name of the msvcrXX.dll (vcruntimeXXX.dll) MSVCRT_NAME = vcruntime$(MSVCRT_VER) ### Set the default $(WINVER) to make it work with Windows 7 -!ifndef WINVER -! if "$(CPU)" == "ARM64" +!IFNDEF WINVER +! IF "$(CPU)" == "ARM64" WINVER = 0x0A00 -! else +! ELSE WINVER = 0x0601 -! endif -!endif +! ENDIF +!ENDIF # Use multiprocess build USE_MP = yes -!if "$(FEATURES)" == "" +!IF "$(FEATURES)" == "" FEATURES = HUGE -!endif +!ENDIF -!ifndef CTAGS +!IFNDEF CTAGS # this assumes ctags is Exuberant ctags CTAGS = ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S -!endif +!ENDIF -!ifndef CSCOPE +!IFNDEF CSCOPE CSCOPE = yes -!endif +!ENDIF -!if "$(CSCOPE)" == "yes" +!IF "$(CSCOPE)" == "yes" # CSCOPE - Include support for Cscope -CSCOPE_DEFS = -DFEAT_CSCOPE -!endif +CSCOPE_DEFS = -DFEAT_CSCOPE +!ENDIF -!ifndef TERMINAL -! if "$(FEATURES)" == "HUGE" +!IFNDEF TERMINAL +! IF "$(FEATURES)" == "HUGE" TERMINAL = yes -! else +! ELSE TERMINAL = no -! endif -!endif +! ENDIF +!ENDIF -!if "$(TERMINAL)" == "yes" +!IF "$(TERMINAL)" == "yes" TERM_OBJ = \ $(OBJDIR)/terminal.obj \ $(OBJDIR)/libvterm/encoding.obj \ @@ -397,125 +390,125 @@ TERM_DEPS = \ libvterm/src/rect.h \ libvterm/src/utf8.h \ libvterm/src/vterm_internal.h -!endif +!ENDIF -!ifndef SOUND -! if "$(FEATURES)" == "HUGE" +!IFNDEF SOUND +! IF "$(FEATURES)" == "HUGE" SOUND = yes -! else +! ELSE SOUND = no -! endif -!endif +! ENDIF +!ENDIF -!ifndef SODIUM +!IFNDEF SODIUM SODIUM = no -!endif -!ifndef DYNAMIC_SODIUM +!ENDIF +!IFNDEF DYNAMIC_SODIUM DYNAMIC_SODIUM = yes -!endif - -!if "$(SODIUM)" != "no" -! if "$(CPU)" == "AMD64" -SOD_LIB = $(SODIUM)\x64\Release 143\dynamic -! elseif "$(CPU)" == "i386" -SOD_LIB = $(SODIUM)\Win32\Release 143\dynamic -! else +!ENDIF + +!IF "$(SODIUM)" != "no" +! IF "$(CPU)" == "AMD64" +SOD_LIB = $(SODIUM)\x64\Release 143\dynamic +! ELSEIF "$(CPU)" == "i386" +SOD_LIB = $(SODIUM)\Win32\Release 143\dynamic +! ELSE SODIUM = no -! endif -!endif - -!if "$(SODIUM)" != "no" -SOD_INC = /I "$(SODIUM)\include" -! if "$(DYNAMIC_SODIUM)" == "yes" -SODIUM_DLL = libsodium.dll -SOD_DEFS = -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"$(SODIUM_DLL)\" -SOD_LIB = -! else -SOD_DEFS = -DHAVE_SODIUM -SOD_LIB = $(SOD_LIB)\libsodium.lib -! endif -!endif - -!ifndef NETBEANS +! ENDIF +!ENDIF + +!IF "$(SODIUM)" != "no" +SOD_INC = /I "$(SODIUM)\include" +! IF "$(DYNAMIC_SODIUM)" == "yes" +SODIUM_DLL = libsodium.dll +SOD_DEFS = -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"$(SODIUM_DLL)\" +SOD_LIB = +! ELSE +SOD_DEFS = -DHAVE_SODIUM +SOD_LIB = $(SOD_LIB)\libsodium.lib +! ENDIF +!ENDIF + +!IFNDEF NETBEANS NETBEANS = $(GUI) -!endif +!ENDIF -!ifndef CHANNEL -! if "$(FEATURES)" == "HUGE" || "$(TERMINAL)" == "yes" +!IFNDEF CHANNEL +! IF "$(FEATURES)" == "HUGE" || "$(TERMINAL)" == "yes" CHANNEL = yes -! else +! ELSE CHANNEL = $(GUI) -! endif -!endif +! ENDIF +!ENDIF # GUI specific features. -!if "$(GUI)" == "yes" +!IF "$(GUI)" == "yes" # Only allow NETBEANS for a GUI build and CHANNEL. -! if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes" +! IF "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes" # NETBEANS - Include support for Netbeans integration -NETBEANS_PRO = proto/netbeans.pro -NETBEANS_OBJ = $(OBJDIR)/netbeans.obj -NETBEANS_DEFS = -DFEAT_NETBEANS_INTG - -! if "$(NBDEBUG)" == "yes" -NBDEBUG_DEFS = -DNBDEBUG -NBDEBUG_INCL = nbdebug.h -NBDEBUG_SRC = nbdebug.c -! endif -! endif +NETBEANS_PRO = proto/netbeans.pro +NETBEANS_OBJ = $(OBJDIR)/netbeans.obj +NETBEANS_DEFS = -DFEAT_NETBEANS_INTG + +! IF "$(NBDEBUG)" == "yes" +NBDEBUG_DEFS = -DNBDEBUG +NBDEBUG_INCL = nbdebug.h +NBDEBUG_SRC = nbdebug.c +! ENDIF +! ENDIF # DirectWrite (DirectX) -! if "$(DIRECTX)" == "yes" -DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -! if "$(COLOR_EMOJI)" != "no" -DIRECTX_DEFS = $(DIRECTX_DEFS) -DFEAT_DIRECTX_COLOR_EMOJI -! endif -DIRECTX_INCL = gui_dwrite.h -DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj -! endif +! IF "$(DIRECTX)" == "yes" +DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX +! IF "$(COLOR_EMOJI)" != "no" +DIRECTX_DEFS = $(DIRECTX_DEFS) -DFEAT_DIRECTX_COLOR_EMOJI +! ENDIF +DIRECTX_INCL = gui_dwrite.h +DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj +! ENDIF # Only allow XPM for a GUI build. -! ifndef XPM -! ifndef USE_MSVCRT +! IFNDEF XPM +! IFNDEF USE_MSVCRT # Both XPM and USE_MSVCRT are not set, use the included xpm files, depending # on the architecture. -! if "$(CPU)" == "AMD64" +! IF "$(CPU)" == "AMD64" XPM = xpm\x64 -! elseif "$(CPU)" == "ARM64" +! ELSEIF "$(CPU)" == "ARM64" XPM = xpm rm64 -! elseif "$(CPU)" == "i386" +! ELSEIF "$(CPU)" == "i386" XPM = xpm\x86 -! else +! ELSE XPM = no -! endif -! else # USE_MSVCRT +! ENDIF +! ELSE # USE_MSVCRT XPM = no -! endif # USE_MSVCRT -! endif # XPM -! if "$(XPM)" != "no" +! ENDIF # USE_MSVCRT +! ENDIF # XPM +! IF "$(XPM)" != "no" # XPM - Include support for XPM signs # See the xpm directory for more information. -XPM_OBJ = $(OBJDIR)/xpm_w32.obj -XPM_DEFS = -DFEAT_XPM_W32 -XPM_LIB = $(XPM)\lib-vc14\libXpm.lib -XPM_INC = -I $(XPM)\include -I $(XPM)\..\include -! endif -!endif # GUI - -!if "$(SOUND)" == "yes" -SOUND_PRO = proto/sound.pro -SOUND_OBJ = $(OBJDIR)/sound.obj -SOUND_DEFS = -DFEAT_SOUND -SOUND_LIB = winmm.lib -!endif - -!if "$(CHANNEL)" == "yes" -CHANNEL_PRO = proto/job.pro proto/channel.pro -CHANNEL_OBJ = $(OBJDIR)/job.obj $(OBJDIR)/channel.obj -CHANNEL_DEFS = -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP - -NETBEANS_LIB = Ws2_32.lib -!endif +XPM_OBJ = $(OBJDIR)/xpm_w32.obj +XPM_DEFS = -DFEAT_XPM_W32 +XPM_LIB = $(XPM)\lib-vc14\libXpm.lib +XPM_INC = -I $(XPM)\include -I $(XPM)\..\include +! ENDIF +!ENDIF # GUI + +!IF "$(SOUND)" == "yes" +SOUND_PRO = proto/sound.pro +SOUND_OBJ = $(OBJDIR)/sound.obj +SOUND_DEFS = -DFEAT_SOUND +SOUND_LIB = winmm.lib +!ENDIF + +!IF "$(CHANNEL)" == "yes" +CHANNEL_PRO = proto/job.pro proto/channel.pro +CHANNEL_OBJ = $(OBJDIR)/job.obj $(OBJDIR)/channel.obj +CHANNEL_DEFS = -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP + +NETBEANS_LIB = Ws2_32.lib +!ENDIF # need advapi32.lib for GetUserName() # need shell32.lib for ExtractIcon() @@ -523,11 +516,11 @@ NETBEANS_LIB = Ws2_32.lib # gdi32.lib and comdlg32.lib for printing support # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \ - comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib \ - /machine:$(CPU) -!if "$(DELAYLOAD)" == "yes" + comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib \ + /machine:$(CPU) +!IF "$(DELAYLOAD)" == "yes" CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib -!endif +!ENDIF # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal # default, use these lines. @@ -535,159 +528,158 @@ CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib #VIMRUNTIMEDIR = somewhere CFLAGS = -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DHAVE_STDINT_H \ - $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) \ - $(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \ - $(CHANNEL_DEFS) $(DEFINES) $(CI_CFLAGS) \ - -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ - /source-charset:utf-8 + $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) \ + $(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) $(CHANNEL_DEFS) \ + $(DEFINES) $(CI_CFLAGS) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ + /source-charset:utf-8 + +RCFLAGS = -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) #>>>>> end of choices ########################################################################### -DEL_TREE = rmdir /s /q - INTDIR = $(OBJDIR) OUTDIR = $(OBJDIR) ### Validate CPUNR -!if "$(CPU)" == "i386" || "$(CPU)" == "AMD64" -! ifndef CPUNR +!IF "$(CPU)" == "i386" || "$(CPU)" == "AMD64" +! IFNDEF CPUNR # default to SSE2 CPUNR = sse2 -! elseif "$(CPU)" == "i386" \ +! ELSEIF "$(CPU)" == "i386" \ && ("$(CPUNR)" == "i386" || "$(CPUNR)" == "i486" || "$(CPUNR)" == "i586") # alias i386, i486 and i586 to i686 -! message *** WARNING CPUNR=$(CPUNR) is not a valid target architecture. -! message Windows 7 is the minimum target OS, with a minimum target -! message architecture of i686. -! message Retargeting to i686 +! MESSAGE *** WARNING CPUNR=$(CPUNR) is not a valid target architecture. +! MESSAGE Windows 7 is the minimum target OS, with a minimum target +! MESSAGE architecture of i686. +! MESSAGE Retargeting to i686 CPUNR = i686 -! elseif "$(CPUNR)" == "pentium4" +! ELSEIF "$(CPUNR)" == "pentium4" # alias pentium4 to sse2 -! message *** WARNING CPUNR=pentium4 is deprecated in favour of sse2. -! message Retargeting to sse2. +! MESSAGE *** WARNING CPUNR=pentium4 is deprecated in favour of sse2. +! MESSAGE Retargeting to sse2. CPUNR = sse2 -! elseif ("$(CPU)" != "i386" \ +! ELSEIF ("$(CPU)" != "i386" \ || ("$(CPUNR)" != "any" && "$(CPUNR)" != "i686" \ && "$(CPUNR)" != "sse" )) \ && "$(CPUNR)" != "sse2" && "$(CPUNR)" != "avx" \ && "$(CPUNR)" != "avx2" && "$(CPUNR)" != "avx512" -! error *** ERROR Unknown target architecture "$(CPUNR)". Make aborted. -! endif -!elseif "$(CPU)" == "ARM64" +! ERROR *** ERROR Unknown target architecture "$(CPUNR)". Make aborted. +! ENDIF +!ELSEIF "$(CPU)" == "ARM64" # TODO: Validate CPUNR depending on the VS version. CPUNR = armv8.0 -!endif +!ENDIF # Convert processor ID to MVC-compatible number -!if "$(CPU)" == "i386" || "$(CPU)" == "AMD64" +!IF "$(CPU)" == "i386" || "$(CPU)" == "AMD64" # IA32/SSE/SSE2 are only supported on x86 -! if "$(CPU)" == "i386" \ +! IF "$(CPU)" == "i386" \ && ("$(CPUNR)" == "i686" || "$(CPUNR)" == "any") CPUARG = /arch:IA32 -! elseif "$(CPU)" == "i386" && "$(CPUNR)" == "sse" +! ELSEIF "$(CPU)" == "i386" && "$(CPUNR)" == "sse" CPUARG = /arch:SSE -! elseif "$(CPU)" == "i386" && "$(CPUNR)" == "sse2" +! ELSEIF "$(CPU)" == "i386" && "$(CPUNR)" == "sse2" CPUARG = /arch:SSE2 -! elseif "$(CPUNR)" == "avx" +! ELSEIF "$(CPUNR)" == "avx" CPUARG = /arch:AVX -! elseif "$(CPUNR)" == "avx2" +! ELSEIF "$(CPUNR)" == "avx2" CPUARG = /arch:AVX2 -! elseif "$(CPUNR)" == "avx512" +! ELSEIF "$(CPUNR)" == "avx512" CPUARG = /arch:AVX512 -! endif -!elseif "$(CPU)" == "ARM64" && defined(CPUNR) +! ENDIF +!ELSEIF "$(CPU)" == "ARM64" && defined(CPUNR) CPUARG = /arch:$(CPUNR) -!endif +!ENDIF # Pass CPUARG to GvimExt, to avoid using version-dependent defaults MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) CPUARG="$(CPUARG)" -!if "$(VIMDLL)" == "yes" +!IF "$(VIMDLL)" == "yes" VIMDLLBASE = vim -! if "$(CPU)" == "i386" +! IF "$(CPU)" == "i386" VIMDLLBASE = $(VIMDLLBASE)32 -! else +! ELSE VIMDLLBASE = $(VIMDLLBASE)64 -! endif -! if "$(DEBUG)" == "yes" +! ENDIF +! IF "$(DEBUG)" == "yes" VIMDLLBASE = $(VIMDLLBASE)d -! endif -!endif +! ENDIF +!ENDIF LIBC = DEBUGINFO = /Zi # Use multiprocess build. -!if "$(USE_MP)" == "yes" +!IF "$(USE_MP)" == "yes" CFLAGS = $(CFLAGS) /MP -!endif +!ENDIF # Use static code analysis -!if "$(ANALYZE)" == "yes" +!IF "$(ANALYZE)" == "yes" CFLAGS = $(CFLAGS) /analyze -!endif +!ENDIF # Address Sanitizer (ASAN) generally available starting with VS2019 version # 16.9 -!if ("$(ASAN)" == "yes") && ($(MSVC_FULL) >= 192829913) +!IF ("$(ASAN)" == "yes") && ($(MSVC_FULL) >= 192829913) CFLAGS = $(CFLAGS) /fsanitize=address -!endif +!ENDIF -!ifdef NODEBUG +!IFDEF NODEBUG VIM = vim -! if "$(OPTIMIZE)" == "SPACE" +! IF "$(OPTIMIZE)" == "SPACE" OPTFLAG = /O1 -! elseif "$(OPTIMIZE)" == "SPEED" +! ELSEIF "$(OPTIMIZE)" == "SPEED" OPTFLAG = /O2 -! else # MAXSPEED +! ELSE # MAXSPEED OPTFLAG = /Ox -! endif +! ENDIF # Use link time code generation if not worried about size -! if "$(OPTIMIZE)" != "SPACE" +! IF "$(OPTIMIZE)" != "SPACE" OPTFLAG = $(OPTFLAG) /GL -! endif +! ENDIF CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG) RCFLAGS = $(RCFLAGS) -DNDEBUG -! ifdef USE_MSVCRT +! IFDEF USE_MSVCRT CFLAGS = $(CFLAGS) /MD LIBC = msvcrt.lib -! else +! ELSE CFLAGS = $(CFLAGS) /Zl /MT LIBC = libcmt.lib -! endif +! ENDIF -!else # DEBUG +!ELSE # DEBUG VIM = vimd -! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86") +! IF ("$(CPU)" == "i386") || ("$(CPU)" == "ix86") DEBUGINFO = /ZI -! endif +! ENDIF CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od RCFLAGS = $(RCFLAGS) -D_DEBUG -DDEBUG # The /fixed:no is needed for Quantify. LIBC = /fixed:no -! ifdef USE_MSVCRT +! IFDEF USE_MSVCRT CFLAGS = $(CFLAGS) /MDd LIBC = $(LIBC) msvcrtd.lib -! else +! ELSE CFLAGS = $(CFLAGS) /Zl /MTd LIBC = $(LIBC) libcmtd.lib -! endif +! ENDIF -!endif # DEBUG +!ENDIF # DEBUG # Visual Studio 2005 has 'deprecated' many of the standard CRT functions CFLAGS_DEPR = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE CFLAGS = $(CFLAGS) $(CFLAGS_DEPR) -!include Make_all.mak -!include testdir\Make_all.mak +!INCLUDE .\Make_all.mak +!INCLUDE . estdir\Make_all.mak -INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h errors.h globals.h \ +INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h errors.h globals.h \ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \ spell.h structs.h termdefs.h beval.h $(NBDEBUG_INCL) @@ -812,58 +804,58 @@ OBJ = \ $(OUTDIR)\winclip.obj \ $(OUTDIR)\window.obj \ -!if "$(VIMDLL)" == "yes" +!IF "$(VIMDLL)" == "yes" OBJ = $(OBJ) $(OUTDIR)\os_w32dll.obj $(OUTDIR) imd.res EXEOBJC = $(OUTDIR)\os_w32exec.obj $(OUTDIR) imc.res EXEOBJG = $(OUTDIR)\os_w32exeg.obj $(OUTDIR) img.res CFLAGS = $(CFLAGS) -DVIMDLL -! ifdef MZSCHEME +! IFDEF MZSCHEME EXECFLAGS = EXELIBC = $(LIBC) -! else +! ELSE EXECFLAGS = -DUSE_OWNSTARTUP /GS- EXELIBC = -! endif -!else +! ENDIF +!ELSE OBJ = $(OBJ) $(OUTDIR)\os_w32exe.obj $(OUTDIR) im.res -!endif +!ENDIF -!if "$(OLE)" == "yes" +!IF "$(OLE)" == "yes" CFLAGS = $(CFLAGS) -DFEAT_OLE RCFLAGS = $(RCFLAGS) -DFEAT_OLE OLE_OBJ = $(OUTDIR)\if_ole.obj OLE_IDL = if_ole.idl OLE_LIB = oleaut32.lib -!endif +!ENDIF -!ifndef IME +!IFNDEF IME IME = yes -!endif -!if "$(IME)" == "yes" +!ENDIF +!IF "$(IME)" == "yes" CFLAGS = $(CFLAGS) -DFEAT_MBYTE_IME -! ifndef DYNAMIC_IME +! IFNDEF DYNAMIC_IME DYNAMIC_IME = yes -! endif -! if "$(DYNAMIC_IME)" == "yes" +! ENDIF +! IF "$(DYNAMIC_IME)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_IME -! else +! ELSE IME_LIB = imm32.lib -! endif -!endif +! ENDIF +!ENDIF -!if "$(GUI)" == "yes" +!IF "$(GUI)" == "yes" SUBSYSTEM = windows CFLAGS = $(CFLAGS) -DFEAT_GUI_MSWIN RCFLAGS = $(RCFLAGS) -DFEAT_GUI_MSWIN -! if "$(VIMDLL)" == "yes" +! IF "$(VIMDLL)" == "yes" SUBSYSTEM_CON = console GVIM = g$(VIM) CUI_INCL = iscygpty.h CUI_OBJ = $(OUTDIR)\iscygpty.obj RCFLAGS = $(RCFLAGS) -DVIMDLL -! else +! ELSE VIM = g$(VIM) -! endif +! ENDIF GUI_INCL = \ gui.h GUI_OBJ = \ @@ -872,11 +864,11 @@ GUI_OBJ = \ $(OUTDIR)\gui_w32.obj GUI_LIB = \ version.lib $(IME_LIB) winspool.lib comctl32.lib -!else +!ELSE SUBSYSTEM = console CUI_INCL = iscygpty.h CUI_OBJ = $(OUTDIR)\iscygpty.obj -!endif +!ENDIF SUBSYSTEM_TOOLS = console XDIFF_OBJ = $(OBJDIR)/xdiffi.obj \ @@ -897,322 +889,322 @@ XDIFF_DEPS = \ xdiff/xutils.h -!if "$(SUBSYSTEM_VER)" != "" +!IF "$(SUBSYSTEM_VER)" != "" SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER) -! if "$(VIMDLL)" == "yes" +! IF "$(VIMDLL)" == "yes" SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER) -! endif +! ENDIF # Pass SUBSYSTEM_VER to GvimExt and other tools MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) SUBSYSTEM_VER=$(SUBSYSTEM_VER) MAKEFLAGS_TOOLS = $(MAKEFLAGS_TOOLS) SUBSYSTEM_VER=$(SUBSYSTEM_VER) -!endif +!ENDIF -!if "$(GUI)" == "yes" && "$(DIRECTX)" == "yes" +!IF "$(GUI)" == "yes" && "$(DIRECTX)" == "yes" CFLAGS = $(CFLAGS) $(DIRECTX_DEFS) GUI_INCL = $(GUI_INCL) $(DIRECTX_INCL) GUI_OBJ = $(GUI_OBJ) $(DIRECTX_OBJ) -!endif +!ENDIF # iconv.dll library (dynamically loaded) -!ifndef ICONV +!IFNDEF ICONV ICONV = yes -!endif -!if "$(ICONV)" == "yes" +!ENDIF +!IF "$(ICONV)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_ICONV -!endif +!ENDIF # libintl.dll library -!ifndef GETTEXT +!IFNDEF GETTEXT GETTEXT = yes -!endif -!if "$(GETTEXT)" == "yes" +!ENDIF +!IF "$(GETTEXT)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_GETTEXT -!endif +!ENDIF # TCL interface -!ifdef TCL -! ifndef TCL_VER +!IFDEF TCL +! IFNDEF TCL_VER TCL_VER = 86 TCL_VER_LONG = 8.6 -! endif -! message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)" -! if "$(DYNAMIC_TCL)" == "yes" -! message Tcl DLL will be loaded dynamically -! ifndef TCL_DLL +! ENDIF +! MESSAGE Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)" +! IF "$(DYNAMIC_TCL)" == "yes" +! MESSAGE Tcl DLL will be loaded dynamically +! IFNDEF TCL_DLL TCL_DLL = tcl$(TCL_VER).dll -! endif -CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \ +! ENDIF +CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \ -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\" -TCL_OBJ = $(OUTDIR)\if_tcl.obj -TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" +TCL_OBJ = $(OUTDIR)\if_tcl.obj +TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" TCL_LIB = "$(TCL)\lib clstub$(TCL_VER).lib" -! else -CFLAGS = $(CFLAGS) -DFEAT_TCL -TCL_OBJ = $(OUTDIR)\if_tcl.obj -TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" +! ELSE +CFLAGS = $(CFLAGS) -DFEAT_TCL +TCL_OBJ = $(OUTDIR)\if_tcl.obj +TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" TCL_LIB = "$(TCL)\lib cl$(TCL_VER)vc.lib" -! endif -!endif +! ENDIF +!ENDIF # Lua interface -!ifdef LUA -! ifndef LUA_VER +!IFDEF LUA +! IFNDEF LUA_VER LUA_VER = 53 -! endif -! message Lua requested (version $(LUA_VER)) - root dir is "$(LUA)" -! if "$(DYNAMIC_LUA)" == "yes" -! message Lua DLL will be loaded dynamically -! endif +! ENDIF +! MESSAGE Lua requested (version $(LUA_VER)) - root dir is "$(LUA)" +! IF "$(DYNAMIC_LUA)" == "yes" +! MESSAGE Lua DLL will be loaded dynamically +! ENDIF CFLAGS = $(CFLAGS) -DFEAT_LUA LUA_OBJ = $(OUTDIR)\if_lua.obj LUA_INC = /I "$(LUA)\include" /I "$(LUA)" -! if "$(DYNAMIC_LUA)" == "yes" +! IF "$(DYNAMIC_LUA)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_LUA \ -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\" LUA_LIB = /nodefaultlib:lua$(LUA_VER).lib -! else +! ELSE LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib" -! endif -!endif +! ENDIF +!ENDIF -!if defined(PYTHON) && defined(PYTHON3) +!IF defined(PYTHON) && defined(PYTHON3) DYNAMIC_PYTHON = yes DYNAMIC_PYTHON3 = yes -!endif +!ENDIF # PYTHON interface -!ifdef PYTHON -! ifndef PYTHON_VER +!IFDEF PYTHON +! IFNDEF PYTHON_VER PYTHON_VER = 27 -! endif -! message Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)" -! if "$(DYNAMIC_PYTHON)" == "yes" -! message Python DLL will be loaded dynamically -! endif +! ENDIF +! MESSAGE Python requested (version $(PYTHON_VER)) - root dir is "$(PYTHON)" +! IF "$(DYNAMIC_PYTHON)" == "yes" +! MESSAGE Python DLL will be loaded dynamically +! ENDIF CFLAGS = $(CFLAGS) -DFEAT_PYTHON PYTHON_OBJ = $(OUTDIR)\if_python.obj PYTHON_INC = /I "$(PYTHON)\Include" /I "$(PYTHON)\PC" -! if "$(DYNAMIC_PYTHON)" == "yes" +! IF "$(DYNAMIC_PYTHON)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON \ -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" PYTHON_LIB = /nodefaultlib:python$(PYTHON_VER).lib -! else +! ELSE PYTHON_LIB = "$(PYTHON)\libs\python$(PYTHON_VER).lib" -! endif -!endif +! ENDIF +!ENDIF # PYTHON3 interface -!ifdef PYTHON3 -! ifndef DYNAMIC_PYTHON3_STABLE_ABI -! if "$(DYNAMIC_PYTHON3)" == "yes" +!IFDEF PYTHON3 +! IFNDEF DYNAMIC_PYTHON3_STABLE_ABI +! IF "$(DYNAMIC_PYTHON3)" == "yes" DYNAMIC_PYTHON3_STABLE_ABI = yes -! endif -! endif -! ifndef PYTHON3_VER +! ENDIF +! ENDIF +! IFNDEF PYTHON3_VER PYTHON3_VER = 38 -! endif -! if "$(DYNAMIC_PYTHON3_STABLE_ABI)" == "yes" +! ENDIF +! IF "$(DYNAMIC_PYTHON3_STABLE_ABI)" == "yes" PYTHON3_NAME = python3 -! else +! ELSE PYTHON3_NAME = python$(PYTHON3_VER) -! endif -! ifndef DYNAMIC_PYTHON3_DLL +! ENDIF +! IFNDEF DYNAMIC_PYTHON3_DLL DYNAMIC_PYTHON3_DLL = $(PYTHON3_NAME).dll -! endif -! message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)" -! if "$(DYNAMIC_PYTHON3)" == "yes" -! message Python3 DLL will be loaded dynamically -! endif +! ENDIF +! MESSAGE Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)" +! IF "$(DYNAMIC_PYTHON3)" == "yes" +! MESSAGE Python3 DLL will be loaded dynamically +! ENDIF CFLAGS = $(CFLAGS) -DFEAT_PYTHON3 PYTHON3_OBJ = $(OUTDIR)\if_python3.obj PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC" -! if "$(DYNAMIC_PYTHON3)" == "yes" +! IF "$(DYNAMIC_PYTHON3)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \ -DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\" -! if "$(DYNAMIC_PYTHON3_STABLE_ABI)" == "yes" +! IF "$(DYNAMIC_PYTHON3_STABLE_ABI)" == "yes" CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3_STABLE_ABI PYTHON3_INC = $(PYTHON3_INC) -DPy_LIMITED_API=0x3080000 -! endif +! ENDIF PYTHON3_LIB = /nodefaultlib:$(PYTHON3_NAME).lib -! else +! ELSE CFLAGS = $(CFLAGS) -DPYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\" PYTHON3_LIB = "$(PYTHON3)\libs\$(PYTHON3_NAME).lib" -! endif -!endif +! ENDIF +!ENDIF # MzScheme interface -!ifdef MZSCHEME -! message MzScheme requested - root dir is "$(MZSCHEME)" -! ifndef MZSCHEME_VER +!IFDEF MZSCHEME +! MESSAGE MzScheme requested - root dir is "$(MZSCHEME)" +! IFNDEF MZSCHEME_VER MZSCHEME_VER = 3m_a0solc -! endif -! ifndef MZSCHEME_COLLECTS +! ENDIF +! IFNDEF MZSCHEME_COLLECTS MZSCHEME_COLLECTS = $(MZSCHEME) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uppxQ-00F5Ax-2E%40256bit.org.