home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.2 / 7.2.372 < prev    next >
Encoding:
Internet Message Format  |  2010-02-23  |  9.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.372 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.372 (extra)
  11. Problem:    Cross-compiling GvimExt and xxd doesn't work.
  12. Solution:   Change the build files. (Markus Heidelberg)
  13. Files:        src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak,
  14.         src/Make_ming.mak, src/xxd/Make_cyg.mak
  15.  
  16.  
  17. *** ../vim-7.2.371/src/INSTALLpc.txt    2008-07-13 19:20:53.000000000 +0200
  18. --- src/INSTALLpc.txt    2010-01-19 12:37:03.000000000 +0100
  19. ***************
  20. *** 215,222 ****
  21.   
  22.   You should not need to do *any* editing of any files to get vim compiled this
  23.   way.  If, for some reason, you want the console-mode-only version of vim (this
  24. ! is NOT recommended on Win32, especially on '95/'98!!!), you need only change
  25. ! the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
  26.   
  27.   If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
  28.   (also free!) and compress the file (typical compression is 50%). UPX can be
  29. --- 215,223 ----
  30.   
  31.   You should not need to do *any* editing of any files to get vim compiled this
  32.   way.  If, for some reason, you want the console-mode-only version of vim (this
  33. ! is NOT recommended on Win32, especially on '95/'98!!!), you can use:
  34. !     make -f Make_ming.mak GUI=no vim.exe
  35.   
  36.   If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
  37.   (also free!) and compress the file (typical compression is 50%). UPX can be
  38. ***************
  39. *** 240,246 ****
  40.   The Cygnus one many not fully work yet.
  41.   With Cygnus gcc you can use the Unix Makefile instead (you need to get the
  42.   Unix archive then).  Then you get a Cygwin application (feels like Vim is
  43. ! runnin on Unix), while with Make_cyg.mak you get a Windows application (like
  44.   with the other makefiles).
  45.   
  46.   
  47. --- 241,247 ----
  48.   The Cygnus one many not fully work yet.
  49.   With Cygnus gcc you can use the Unix Makefile instead (you need to get the
  50.   Unix archive then).  Then you get a Cygwin application (feels like Vim is
  51. ! running on Unix), while with Make_cyg.mak you get a Windows application (like
  52.   with the other makefiles).
  53.   
  54.   
  55. ***************
  56. *** 259,268 ****
  57. --- 260,272 ----
  58.   If you like, you can compile the 'mingw' Win32 version from the comfort of
  59.   your Linux (or other unix) box.  To do this, you need to follow a few steps:
  60.       1) Install the mingw32 cross-compiler. See
  61. +     http://www.mingw.org/wiki/LinuxCrossMinGW
  62.       http://www.libsdl.org/extras/win32/cross/README.txt
  63.       2) Get and unpack both the Unix sources and the extra archive
  64.       3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
  65.          Make further changes to 'Make_ming.mak' as you wish.
  66. +        If your cross-compiler prefix differs from the predefined value,
  67. +        set 'CROSS_COMPILE' corresponding.
  68.       4) make -f Make_ming.mak gvim.exe
  69.   
  70.   Now you have created the Windows binary from your Linux box!  Have fun...
  71. *** ../vim-7.2.371/src/GvimExt/Make_ming.mak    2005-01-09 22:15:44.000000000 +0100
  72. --- src/GvimExt/Make_ming.mak    2010-02-24 14:56:37.000000000 +0100
  73. ***************
  74. *** 20,36 ****
  75.   ifeq ($(CROSS),yes)
  76.   DEL = rm
  77.   ifeq ($(MINGWOLD),yes)
  78. - CXX = i586-mingw32msvc-g++
  79.   CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
  80. - WINDRES = i586-mingw32msvc-windres
  81.   else
  82. - CXX = i386-mingw32msvc-g++
  83.   CXXFLAGS := -O2 -mno-cygwin
  84. - WINDRES = i386-mingw32msvc-windres
  85.   endif
  86.   else
  87. - CXX := g++
  88. - WINDRES := windres
  89.   CXXFLAGS := -O2 -mno-cygwin
  90.   ifneq (sh.exe, $(SHELL))
  91.   DEL = rm
  92. --- 20,30 ----
  93. ***************
  94. *** 38,43 ****
  95. --- 32,39 ----
  96.   DEL = del
  97.   endif
  98.   endif
  99. + CXX := $(CROSS_COMPILE)g++
  100. + WINDRES := $(CROSS_COMPILE)windres
  101.   LIBS :=  -luuid
  102.   RES  := gvimext.res
  103.   DEFFILE = gvimext_ming.def
  104. *** ../vim-7.2.371/src/Make_cyg.mak    2009-09-11 12:48:56.000000000 +0200
  105. --- src/Make_cyg.mak    2010-02-24 14:59:02.000000000 +0100
  106. ***************
  107. *** 1,6 ****
  108.   #
  109.   # Makefile for VIM on Win32, using Cygnus gcc
  110. ! # Last updated by Dan Sharp.  Last Change: 2007 Sep 29
  111.   #
  112.   # Also read INSTALLpc.txt!
  113.   #
  114. --- 1,6 ----
  115.   #
  116.   # Makefile for VIM on Win32, using Cygnus gcc
  117. ! # Last updated by Dan Sharp.  Last Change: 2010 Feb 24
  118.   #
  119.   # Also read INSTALLpc.txt!
  120.   #
  121. ***************
  122. *** 32,40 ****
  123.   # OLE        no or yes: set to yes to make OLE gvim (no)
  124.   # DEBUG        no or yes: set to yes if you wish a DEBUGging build (no)
  125.   # CPUNR        No longer supported, use ARCH.
  126. ! # ARCH        i386 through pentium4: select -march argument to compile with (i386)
  127.   # USEDLL    no or yes: set to yes to use the Runtime library DLL (no)
  128.   #        For USEDLL=yes the cygwin1.dll is required to run Vim.
  129.   # POSTSCRIPT    no or yes: set to yes for PostScript printing (no)
  130.   # FEATURES    TINY, SMALL, NORMAL, BIG or HUGE (BIG)
  131.   # WINVER    Lowest Win32 version to support.  (0x0400)
  132. --- 32,43 ----
  133.   # OLE        no or yes: set to yes to make OLE gvim (no)
  134.   # DEBUG        no or yes: set to yes if you wish a DEBUGging build (no)
  135.   # CPUNR        No longer supported, use ARCH.
  136. ! # ARCH        i386 through pentium4: select -march argument to compile with
  137. ! #               (i386)
  138.   # USEDLL    no or yes: set to yes to use the Runtime library DLL (no)
  139.   #        For USEDLL=yes the cygwin1.dll is required to run Vim.
  140. + #        "no" does not work with latest version of Cygwin, use
  141. + #        Make_ming.mak instead.  Or set CC to gcc-3.
  142.   # POSTSCRIPT    no or yes: set to yes for PostScript printing (no)
  143.   # FEATURES    TINY, SMALL, NORMAL, BIG or HUGE (BIG)
  144.   # WINVER    Lowest Win32 version to support.  (0x0400)
  145. ***************
  146. *** 99,104 ****
  147. --- 102,108 ----
  148.   INCLUDES = -march=$(ARCH) -Iproto
  149.   
  150.   #>>>>> name of the compiler and linker, name of lib directory
  151. + CROSS_COMPILE =
  152.   CC = gcc
  153.   RC = windres
  154.   
  155. ***************
  156. *** 467,476 ****
  157.       $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
  158.   
  159.   xxd/xxd.exe: xxd/xxd.c
  160. !     $(MAKE) -C xxd -f Make_cyg.mak USEDLL=$(USEDLL)
  161.   
  162.   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
  163. !     $(MAKE) -C GvimExt -f Make_ming.mak
  164.   
  165.   vimrun.exe: vimrun.c
  166.       $(CC) $(CFLAGS) -o vimrun.exe vimrun.c  $(LIBS)
  167. --- 471,480 ----
  168.       $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
  169.   
  170.   xxd/xxd.exe: xxd/xxd.c
  171. !     $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
  172.   
  173.   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
  174. !     $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
  175.   
  176.   vimrun.exe: vimrun.c
  177.       $(CC) $(CFLAGS) -o vimrun.exe vimrun.c  $(LIBS)
  178. *** ../vim-7.2.371/src/Make_ming.mak    2009-09-11 12:48:56.000000000 +0200
  179. --- src/Make_ming.mak    2010-02-24 15:01:31.000000000 +0100
  180. ***************
  181. *** 241,255 ****
  182.   DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
  183.       -DHAVE_PATHDEF -DFEAT_$(FEATURES)
  184.   ifeq ($(CROSS),yes)
  185. ! # cross-compiler:
  186. ! CC = i586-pc-mingw32msvc-gcc
  187.   DEL = rm
  188.   MKDIR = mkdir -p
  189. ! WINDRES = i586-pc-mingw32msvc-windres
  190.   else
  191.   # normal (Windows) compilation:
  192. - CC = gcc
  193.   ifneq (sh.exe, $(SHELL))
  194.   DEL = rm
  195.   MKDIR = mkdir -p
  196.   DIRSLASH = /
  197. --- 241,255 ----
  198.   DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
  199.       -DHAVE_PATHDEF -DFEAT_$(FEATURES)
  200.   ifeq ($(CROSS),yes)
  201. ! # cross-compiler prefix:
  202. ! CROSS_COMPILE = i586-pc-mingw32msvc-
  203.   DEL = rm
  204.   MKDIR = mkdir -p
  205. ! DIRSLASH = /
  206.   else
  207.   # normal (Windows) compilation:
  208.   ifneq (sh.exe, $(SHELL))
  209. + CROSS_COMPILE =
  210.   DEL = rm
  211.   MKDIR = mkdir -p
  212.   DIRSLASH = /
  213. ***************
  214. *** 258,265 ****
  215.   MKDIR = mkdir
  216.   DIRSLASH = \\
  217.   endif
  218. - WINDRES = windres
  219.   endif
  220.   
  221.   #>>>>> end of choices
  222.   ###########################################################################
  223. --- 258,266 ----
  224.   MKDIR = mkdir
  225.   DIRSLASH = \\
  226.   endif
  227.   endif
  228. + CC := $(CROSS_COMPILE)gcc
  229. + WINDRES := $(CROSS_COMPILE)windres
  230.   
  231.   #>>>>> end of choices
  232.   ###########################################################################
  233. ***************
  234. *** 549,558 ****
  235.       upx vim.exe
  236.   
  237.   xxd/xxd.exe: xxd/xxd.c
  238. !     $(MAKE) -C xxd -f Make_cyg.mak
  239.   
  240.   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
  241.       $(MAKE) -C GvimExt -f Make_ming.mak
  242.   
  243.   clean:
  244.       -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
  245. --- 550,560 ----
  246.       upx vim.exe
  247.   
  248.   xxd/xxd.exe: xxd/xxd.c
  249. !     $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC)
  250.   
  251.   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
  252.       $(MAKE) -C GvimExt -f Make_ming.mak
  253. +     $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
  254.   
  255.   clean:
  256.       -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
  257. *** ../vim-7.2.371/src/xxd/Make_cyg.mak    2004-06-13 17:48:52.000000000 +0200
  258. --- src/xxd/Make_cyg.mak    2010-02-24 15:05:24.000000000 +0100
  259. ***************
  260. *** 12,17 ****
  261. --- 12,18 ----
  262.   LIBS    =
  263.   endif
  264.   
  265. + CC = gcc
  266.   CFLAGS = -O2 -Wall -DWIN32 $(DEFINES)
  267.   
  268.   ifneq (sh.exe, $(SHELL))
  269. ***************
  270. *** 21,27 ****
  271.   endif
  272.   
  273.   xxd.exe: xxd.c
  274. !     gcc $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
  275.   
  276.   clean:
  277.       -$(DEL) xxd.exe
  278. --- 22,28 ----
  279.   endif
  280.   
  281.   xxd.exe: xxd.c
  282. !     $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
  283.   
  284.   clean:
  285.       -$(DEL) xxd.exe
  286. *** ../vim-7.2.371/src/version.c    2010-02-24 14:46:58.000000000 +0100
  287. --- src/version.c    2010-02-24 15:05:48.000000000 +0100
  288. ***************
  289. *** 683,684 ****
  290. --- 683,686 ----
  291.   {   /* Add new patch number below this line */
  292. + /**/
  293. +     372,
  294.   /**/
  295.  
  296. -- 
  297. Ten bugs in the hand is better than one as yet undetected.
  298.  
  299.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  300. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  301. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  302.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  303.