2 Subject: patch 7.1.134 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Win32: Can't build with VC8
12 Solution: Detect the MSVC version instead of using NMAKE_VER.
14 Files: src/Make_mvc.mak
17 *** ../vim-7.1.133/src/Make_mvc.mak Tue Feb 20 03:15:08 2007
18 --- src/Make_mvc.mak Mon Oct 1 21:37:20 2007
22 # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
25 + # Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
27 # You can combine any of these interfaces
29 # Example: To build the non-debug, GUI version with Perl interface:
32 # This makefile gives a fineness of control which is not supported in
33 # Visual C++ configuration files. Therefore, debugging requires a bit of
35 ! # Make_dvc.mak is a Visual C++ project to access that support.
36 # To use Make_dvc.mak:
37 # 1) Build Vim with Make_mvc.mak.
38 # Use a "DEBUG=yes" argument to build Vim with debug support.
40 # This makefile gives a fineness of control which is not supported in
41 # Visual C++ configuration files. Therefore, debugging requires a bit of
43 ! # Make_dvc.mak is a Visual C++ project to access that support. It may be
44 ! # badly out of date for the Visual C++ you are using...
45 # To use Make_dvc.mak:
46 # 1) Build Vim with Make_mvc.mak.
47 # Use a "DEBUG=yes" argument to build Vim with debug support.
50 !if "$(DEBUG)" != "yes"
53 MAKEFLAGS_GVIMEXT = DEBUG=yes
57 ! # Get all sorts of useful, standard macros from the SDK. (Note that
58 ! # MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
59 ! # directory, but you can find it in \msvc20\include on the CD-ROM.
60 ! # You may also need <win32.mak> from the same place.)
65 !if "$(DEBUG)" != "yes"
69 MAKEFLAGS_GVIMEXT = DEBUG=yes
73 ! # Get all sorts of useful, standard macros from the Platform SDK.
80 # Set which version of the CRT to use
81 !if defined(USE_MSVCRT)
83 # !elseif defined(MULTITHREADED)
90 # need advapi32.lib for GetUserName()
93 # Set which version of the CRT to use
94 !if defined(USE_MSVCRT)
95 ! # CVARS = $(cvarsdll)
96 # !elseif defined(MULTITHREADED)
100 ! # CVARS = $(cvarsmt)
103 # need advapi32.lib for GetUserName()
110 + # Derive version of VC being used from nmake if not specified
111 + !if "$(MSVCVER)" == ""
112 + !if "$(_NMAKE_VER)" == ""
115 + !if "$(_NMAKE_VER)" == "162"
118 + !if "$(_NMAKE_VER)" == "6.00.8168.0"
121 + !if "$(_NMAKE_VER)" == "7.00.9466"
124 + !if "$(_NMAKE_VER)" == "7.10.3077"
127 + !if "$(_NMAKE_VER)" == "8.00.50727.42"
130 + !if "$(_NMAKE_VER)" == "8.00.50727.762"
135 + # Abort bulding VIM if version of VC is unrecognised.
138 + !message Cannot determine Visual C version being used. If you are using the
139 + !message Windows SDK then you must have the environment variable MSVCVER set to
140 + !message your version of the VC compiler. If you are not using the Express
141 + !message version of Visual C you van either set MSVCVER or update this makefile
142 + !message to handle the new value for _NMAKE_VER.
143 + !error Make aborted.
146 # Convert processor ID to MVC-compatible number
147 + !if "$(MSVCVER)" != "8.0"
148 !if "$(CPUNR)" == "i386"
150 !elseif "$(CPUNR)" == "i486"
158 + # VC8 only allows specifying SSE architecture
159 + !if "$(CPUNR)" == "pentium4"
160 + CPUARG = /arch:SSE2
174 CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
175 RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
177 ! CFLAGS = $(CFLAGS) -MD
179 - # CFLAGS = $(CFLAGS) $(cvarsdll)
180 - # ! elseif defined(MULTITHREADED)
181 - # LIBC = libcmt.lib
182 - # CFLAGS = $(CFLAGS) $(cvarsmt)
186 ! # CFLAGS = $(CFLAGS) $(cvars)
190 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
191 RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
192 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
193 ! ! if "$(_NMAKE_VER)" == ""
199 ! CFLAGS = $(CFLAGS) -MDd
200 LIBC = $(LIBC) msvcrtd.lib
201 - # CFLAGS = $(CFLAGS) $(cvarsdll)
202 - # ! elseif defined(MULTITHREADED)
203 - # LIBC = $(LIBC) libcmtd.lib
204 - # CFLAGS = $(CFLAGS) $(cvarsmt)
206 - # LIBC = $(LIBC) libcd.lib
207 LIBC = $(LIBC) libcmtd.lib
208 ! # CFLAGS = $(CFLAGS) $(cvars)
216 + !if "$(MSVCVER)" == "8.0"
217 + # Use link time code generation if not worried about size
218 + !if "$(OPTIMIZE)" != "SPACE"
219 + OPTFLAG = $(OPTFLAG) /GL
222 CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
223 RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
225 ! CFLAGS = $(CFLAGS) /MD
229 ! CFLAGS = $(CFLAGS) /MT
233 + ! if "$(CPU)" == "i386"
236 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
237 RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
238 # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
239 ! ! if "$(MSVCVER)" == "4.0"
245 ! CFLAGS = $(CFLAGS) /MDd
246 LIBC = $(LIBC) msvcrtd.lib
248 LIBC = $(LIBC) libcmtd.lib
249 ! CFLAGS = $(CFLAGS) /MTd
256 # Always generate the .pdb file, so that we get debug symbols that can be used
257 # on a crash (doesn't add overhead to the executable).
259 ! CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
260 ! LINK_PDB = /PDB:$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
263 # End extra feature include
267 ! conflags = /nologo /subsystem:$(SUBSYSTEM) /incremental:no
269 PATHDEF_SRC = $(OUTDIR)\pathdef.c
273 # Always generate the .pdb file, so that we get debug symbols that can be used
274 # on a crash (doesn't add overhead to the executable).
275 + # Generate edit-and-continue debug info when no optimization - allows to
276 + # debug more conveniently (able to look at variables which are in registers)
278 ! CFLAGS = $(CFLAGS) /Fd$(OUTDIR)/ $(DEBUGINFO)
279 ! LINK_PDB = /PDB:$(VIM).pdb -debug
282 # End extra feature include
286 ! conflags = /nologo /subsystem:$(SUBSYSTEM)
288 PATHDEF_SRC = $(OUTDIR)\pathdef.c
292 conflags = $(conflags) /map /mapinfo:lines
295 ! LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
296 LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
297 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
298 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
300 all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
304 conflags = $(conflags) /map /mapinfo:lines
307 ! LINKARGS1 = $(linkdebug) $(conflags)
308 LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
309 $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
310 $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
312 + # Report link time code generation progress if used.
314 + !if "$(MSVCVER)" == "8.0"
315 + !if "$(OPTIMIZE)" != "SPACE"
316 + LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
321 all: $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
327 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
328 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
329 ! !IF "$(_NMAKE_VER)" == ""
335 # Create a default rule for transforming .c files to .obj files in $(OUTDIR)
336 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
337 ! !IF "$(MSVCVER)" == "4.0"
344 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
345 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
346 ! !IF "$(_NMAKE_VER)" == ""
347 .cpp{$(OUTDIR)/}.obj:
349 .cpp{$(OUTDIR)/}.obj::
352 # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
353 # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
354 ! !IF "$(MSVCVER)" == "4.0"
355 .cpp{$(OUTDIR)/}.obj:
357 .cpp{$(OUTDIR)/}.obj::
358 *** ../vim-7.1.133/src/version.c Wed Oct 3 12:49:24 2007
359 --- src/version.c Wed Oct 3 13:23:51 2007
363 { /* Add new patch number below this line */
369 BLACK KNIGHT: The Black Knight always triumphs. Have at you!
370 ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
371 BLACK KNIGHT: All right, we'll call it a draw.
372 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
374 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
375 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
376 \\\ download, build and distribute -- http://www.A-A-P.org ///
377 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///