To: vim_dev@googlegroups.com
Subject: Patch 7.3.653
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.653
Problem:    MingW needs build rule for included XPM files.  Object directory
	    for 32 and 64 builds is the same, also for MSVC.
Solution:   Add MingW build rule to use included XPM files.  Add the CPU or
	    architecture to the object directory name. (Sergey Khorev)
Files:	    src/Make_ming.mak, src/Make_mvc.mak, src/xpm/README.txt


*** ../vim-7.3.652/src/Make_ming.mak	2012-08-02 21:21:43.000000000 +0200
--- src/Make_ming.mak	2012-09-05 17:43:11.000000000 +0200
***************
*** 1,14 ****
! # Makefile for VIM on Win32, using 'EGCS/mingw32 1.1.2'.
  # Info at http://www.mingw.org
! # Also requires 'GNU make 3.77', which you can get through a link
! # to 'JanJaap's page from the above page.
  # Get missing libraries from http://gnuwin32.sf.net.
  #
  # Tested on Win32 NT 4 and Win95.
  #
! # To make everything, just 'make -f Make_ming.mak'
! # To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'
! # After a run, you can 'make -f Make_ming.mak clean' to clean up
  #
  # NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
  # it's just run out of memory or something.  Run again, and it will continue
--- 1,15 ----
! # Makefile for VIM on Win32
! #
  # Info at http://www.mingw.org
! # Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
! # Also requires GNU make, which you can download from the same sites.
  # Get missing libraries from http://gnuwin32.sf.net.
  #
  # Tested on Win32 NT 4 and Win95.
  #
! # To make everything, just 'make -f Make_ming.mak'.
! # To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
! # After a run, you can 'make -f Make_ming.mak clean' to clean up.
  #
  # NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
  # it's just run out of memory or something.  Run again, and it will continue
***************
*** 20,27 ****
  # "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
  #     http://www.matcode.com/mpress.htm
  #
! # Maintained by Ron Aaron <ronaharon@yahoo.com>
! # updated 2003 Jan 20
  
  #>>>>> choose options:
  # set to yes for a debug build
--- 21,28 ----
  # "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
  #     http://www.matcode.com/mpress.htm
  #
! # Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
! # Updated 2012 Sep 5.
  
  #>>>>> choose options:
  # set to yes for a debug build
***************
*** 31,62 ****
  # set to yes to make gvim, no for vim
  GUI=yes
  # FEATURES=[TINY | SMALL  | NORMAL | BIG | HUGE]
! # set to TINY to make minimal version (few features)
  FEATURES=BIG
! # set to one of i386, i486, i586, i686 as the minimum target processor
  ARCH=i386
! # set to yes to cross-compile from unix; no=native Windows
  CROSS=no
! # set to path to iconv.h and libiconv.a to enable using 'iconv.dll'
  #ICONV="."
  ICONV=yes
  GETTEXT=yes
! # set to yes to include multibyte support
  MBYTE=yes
! # set to yes to include IME support
  IME=yes
  DYNAMIC_IME=yes
! # set to yes to enable writing a postscript file with :hardcopy
  POSTSCRIPT=no
! # set to yes to enable OLE support
  OLE=no
! # Set the default $(WINVER) to make it work with pre-Win2k
  ifndef WINVER
  WINVER = 0x0500
  endif
! # Set to yes to enable Cscope support
  CSCOPE=yes
! # Set to yes to enable Netbeans support
  NETBEANS=$(GUI)
  
  
--- 32,64 ----
  # set to yes to make gvim, no for vim
  GUI=yes
  # FEATURES=[TINY | SMALL  | NORMAL | BIG | HUGE]
! # Set to TINY to make minimal version (few features).
  FEATURES=BIG
! # Set to one of i386, i486, i586, i686 as the minimum target processor.
! # For amd64/x64 architecture set ARCH=x86-64 .
  ARCH=i386
! # Set to yes to cross-compile from unix; no=native Windows.
  CROSS=no
! # Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
  #ICONV="."
  ICONV=yes
  GETTEXT=yes
! # Set to yes to include multibyte support.
  MBYTE=yes
! # Set to yes to include IME support.
  IME=yes
  DYNAMIC_IME=yes
! # Set to yes to enable writing a postscript file with :hardcopy.
  POSTSCRIPT=no
! # Set to yes to enable OLE support.
  OLE=no
! # Set the default $(WINVER) to make it work with pre-Win2k.
  ifndef WINVER
  WINVER = 0x0500
  endif
! # Set to yes to enable Cscope support.
  CSCOPE=yes
! # Set to yes to enable Netbeans support.
  NETBEANS=$(GUI)
  
  
***************
*** 431,441 ****
  endif
  endif
  
- ifdef XPM
  # Only allow XPM for a GUI build.
  ifeq (yes, $(GUI))
! CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
  endif
  endif
  
  ifeq ($(DEBUG),yes)
--- 433,464 ----
  endif
  endif
  
  # Only allow XPM for a GUI build.
  ifeq (yes, $(GUI))
! 
! ifndef XPM
! ifeq ($(ARCH),i386)
! XPM = xpm/x86
! endif
! ifeq ($(ARCH),i486)
! XPM = xpm/x86
! endif
! ifeq ($(ARCH),i586)
! XPM = xpm/x86
! endif
! ifeq ($(ARCH),i686)
! XPM = xpm/x86
  endif
+ ifeq ($(ARCH),x86-64)
+ XPM = xpm/x64
+ endif
+ endif
+ ifdef XPM
+ ifneq ($(XPM),no)
+ CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
+ endif
+ endif
+ 
  endif
  
  ifeq ($(DEBUG),yes)
***************
*** 565,574 ****
  DEFINES += $(DEF_GUI)
  OBJ += $(GUIOBJ)
  LFLAGS += -mwindows
! OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
  else
  TARGET := vim$(DEBUG_SUFFIX).exe
! OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
  endif
  
  ifdef GETTEXT
--- 588,597 ----
  DEFINES += $(DEF_GUI)
  OBJ += $(GUIOBJ)
  LFLAGS += -mwindows
! OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
  else
  TARGET := vim$(DEBUG_SUFFIX).exe
! OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
  endif
  
  ifdef GETTEXT
*** ../vim-7.3.652/src/Make_mvc.mak	2012-08-29 14:18:26.000000000 +0200
--- src/Make_mvc.mak	2012-09-05 17:33:56.000000000 +0200
***************
*** 213,218 ****
--- 213,219 ----
  # We're on Windows 95
  CPU = i386
  !endif # !PROCESSOR_ARCHITECTURE
+ OBJDIR = $(OBJDIR)$(CPU)
  
  # Build a retail version by default
  
***************
*** 283,292 ****
  
  !ifndef XPM
  # XPM is not set, use the included xpm files, depending on the architecture.
! !if ("$(CPU)" == "AMD64") || ("$(CPU)" == "IA64")
  XPM = xpm\x64
! !else
  XPM = xpm\x86
  !endif
  !endif
  !if "$(XPM)" != "no"
--- 284,295 ----
  
  !ifndef XPM
  # XPM is not set, use the included xpm files, depending on the architecture.
! !if "$(CPU)" == "AMD64"
  XPM = xpm\x64
! !elseif "$(CPU)" == "i386"
  XPM = xpm\x86
+ !else
+ XPM = no
  !endif
  !endif
  !if "$(XPM)" != "no"
*** ../vim-7.3.652/src/xpm/README.txt	2012-08-29 14:18:26.000000000 +0200
--- src/xpm/README.txt	2012-09-05 17:35:34.000000000 +0200
***************
*** 10,15 ****
--- 10,18 ----
  MinGW:
  mingw32-make -f Make_ming.mak GUI=yes CSCOPE=yes XPM=e:/hg/xpm/x86
  
+ MinGW 64 for x64:
+ mingw32-make -f Make_ming.mak GUI=yes ARCH=x86-64 XPM=E:\HG\xpm\x64
+ 
  Microsoft Visual C++ on x64 (tested with versions 2008 and 2010):
  nmake -f Make_mvc.mak GUI=yes CSCOPE=yes XPM=E:\HG\xpm\x64
  
*** ../vim-7.3.652/src/version.c	2012-09-05 17:28:08.000000000 +0200
--- src/version.c	2012-09-05 17:53:15.000000000 +0200
***************
*** 721,722 ****
--- 721,724 ----
  {   /* Add new patch number below this line */
+ /**/
+     653,
  /**/

-- 
GUARD #2:  Wait a minute -- supposing two swallows carried it together?
GUARD #1:  No, they'd have to have it on a line.
GUARD #2:  Well, simple!  They'd just use a standard creeper!
GUARD #1:  What, held under the dorsal guiding feathers?
GUARD #2:  Well, why not?
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
