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 / 6.2.124 < prev    next >
Encoding:
Internet Message Format  |  2003-10-16  |  11.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.124 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.124 (after 6.2.121)(extra)
  11. Problem:    Mac: Recursive use of M4FLAGS causes problems.  When running Vim
  12.         directly it can't find the runtime files.  (Emily Jackson)
  13.         Using GNU constructs causes warnings with other make programs.
  14.         (Ronald Schild)
  15. Solution:   Use another name for the M4FLAGS variable.
  16.         Don't remove "Vim.app" from the path.
  17.         Update the explanation for compiling on the Mac. (Eric Kow)
  18.         Don't use $(shell ) and $(addprefix ).
  19. Files:        src/INSTALLmac.txt, src/Makefile, src/misc1.c
  20.  
  21.  
  22. *** ../vim-6.2.123/src/INSTALLmac.txt    Sun May  4 22:40:16 2003
  23. --- src/INSTALLmac.txt    Wed Oct 15 16:50:16 2003
  24. ***************
  25. *** 3,69 ****
  26.   This file contains instructions for compiling Vim. If you already have an
  27.   executable version of Vim, you don't need this.
  28.   
  29. ! -----------------------------------------------------------
  30.   
  31. ! Here's a summary of how Vim can be compiled under MacOS, depending on
  32. ! the version of MacOS, the compiler and the interface.
  33.   
  34. ! A. Supported compiler and environement
  35.   
  36. !  1. CodeWarrior (pre-MacOS X)
  37. !  2. MPW (pre-MacOS X)
  38. !  3. Project Builder (MacOS X)
  39. !  4. Unix Compiler (MacOS X)
  40.   
  41. ! B. Supported user interface
  42.   
  43. !  1. Original MacOS Toolbox   [Compile with A.1 and A.2]
  44. !  2. Carbon MacOS         [Compile with A.3]
  45. !  3. X (Athena, GTK, Motif).  [Compile with A.4]
  46. !  4. Plain Text             [Compile with A.4]
  47.   
  48. !  NOTE: Sorry, Cocoa is not expected to be supported for now.
  49. ! C. Supported "OS" style
  50. !  1. MacOS             [Compile as B.1]
  51. !  2. MacOS X             [Compile as B.2]
  52. !  3. BSD Unix             [Compile as B.2, B.3 and B.4]
  53. ! -----------------------------------------------------------
  54. ! Special Consideration
  55. ! ---------------------
  56. ! B.2: Compiling for Carbon
  57. !  Currently the Carbon version can only be compiled properly under MacOS X.
  58. !  The binary created in that way does'nt work under previous version.
  59. ! B.3: Compiling for X
  60. !  You need to first install XFree86 and XDarwin.
  61. !  Please visit http://www.XDarwin.org
  62. ! C.1: The MacOS version
  63. !  Both ':' and '/' supported as path separator.
  64. ! C.2: The MacOS X version
  65. !  Only '/' supported as path separator.
  66. ! C.3: The BSD Unix version
  67.   
  68.    Only '/' supported as path separator.
  69. -  Shell command can be invoked (:!)
  70.   
  71. ! -----------------------------------------------------------
  72.   
  73. ! A.1: Compiling with CodeWarior
  74.   
  75.    1. Expand the resource file:
  76. !    - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
  77.   
  78.    2. Expand the project file:
  79.      - ../src/os_mac.sit.hqx (to produce ../src/vim.mcp)
  80. --- 3,74 ----
  81.   This file contains instructions for compiling Vim. If you already have an
  82.   executable version of Vim, you don't need this.
  83.   
  84. ! An alternate way of building that Benji Fisher uses can be found here:
  85.   
  86. !     http://macvim.swdev.org/OSX/#Developers
  87.   
  88. ! ----------------------------------------------------------------------------
  89. ! Summary
  90. ! ----------------------------------------------------------------------------
  91.   
  92. ! 1 MacOS X
  93. !  1.1. Carbon interface
  94. !  1.2. X (Athena, GTK, Motif) or plain text.  
  95.   
  96. ! 2 MacOS Classic
  97. !  2.1. CodeWarrior 
  98. !  2.2. MPW 
  99.   
  100. ! NOTE: The Carbon version can only be compiled properly under
  101. !       MacOS X.
  102.   
  103. ! ----------------------------------------------------------------------------
  104. ! 1 MacOS X
  105. ! ----------------------------------------------------------------------------
  106.   
  107. + 1.0 Considerations
  108. +  
  109.    Only '/' supported as path separator.
  110.   
  111. ! 1.1 Carbon interface (default)
  112. !  
  113. !  You can compile vim with the standard Unix routine:
  114. !    cd ..
  115. !    ./configure
  116. !    make; make install
  117. !   
  118. !  This will create a working Vim.app application bundle in the src
  119. !  directory.  You can move this bundle (the Vim.app directory) anywhere
  120. !  you want, for example, /Applications.
  121. !  
  122. ! 1.2 X-Windows or Plain Text 
  123. !  
  124. !  If you do not want the Carbon interface, you must explicitly tell
  125. !  configure to use a different GUI.
  126. !  
  127. !   cd ..
  128. !   ./configure --enable-gui=gtk2
  129. !   make; make install
  130. !  
  131. !  NOTE: The following GUI options are supported: 
  132. !         no (for text), motif, athena, nextaw 
  133. !         gtk, gtk2, gnome, gnome2,
  134. !   
  135. !  NOTE: You need to first install XFree86 and XDarwin.
  136. !        Please visit http://www.XDarwin.org
  137. !  
  138. ! ----------------------------------------------------------------------------
  139. ! MacOS 9 
  140. ! ----------------------------------------------------------------------------
  141.   
  142. ! Both ':' and '/' supported as path separator.
  143.   
  144. + 2.1: Compiling with CodeWarior
  145. +  
  146.    1. Expand the resource file:
  147. !    open ../src/os_mac.rsr.hqx to produce ../src/gui_mac.rsrc:
  148. !    % cd vim62/src
  149. !    % open -a StuffIt\ Expander os_mac.rsr.hqx
  150.   
  151.    2. Expand the project file:
  152.      - ../src/os_mac.sit.hqx (to produce ../src/vim.mcp)
  153. ***************
  154. *** 81,88 ****
  155.   
  156.    5. Compile
  157.   
  158. ! A.2: Compiling with MPW.
  159.   
  160.    0. You will need a recent version of the MPW and the Universal Interfaces.
  161.       You can get both at:
  162. --- 86,92 ----
  163.   
  164.    5. Compile
  165.   
  166. ! 2.2: Compiling with MPW.
  167.   
  168.    0. You will need a recent version of the MPW and the Universal Interfaces.
  169.       You can get both at:
  170. ***************
  171. *** 94,100 ****
  172.       Apple.
  173.   
  174.    1. Expand the resource file:
  175. !    - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
  176.   
  177.    3. Double click on os_make.make, the MPW will now open in the correct
  178.       folder and load the CreateVimMake script. Change to the Worksheet
  179. --- 98,106 ----
  180.       Apple.
  181.   
  182.    1. Expand the resource file:
  183. !    open ../src/os_mac.rsr.hqx to produce ../src/gui_mac.rsrc:
  184. !    % cd vim62/src
  185. !    % open -a StuffIt\ Expander os_mac.rsr.hqx
  186.   
  187.    3. Double click on os_make.make, the MPW will now open in the correct
  188.       folder and load the CreateVimMake script. Change to the Worksheet
  189. ***************
  190. *** 103,135 ****
  191.   
  192.    4. Select "Build" from the menu (or type command-B). Type the program name
  193.       into the dialog box.
  194. - A.3: Compiling with Project Builder.
  195. -  1. Expand the resource file:
  196. -    - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
  197. -  2. Open ../src/os_mac.pbproject with Project Builder
  198. -  3. Choose between C.2 and C.3
  199. -     In Target ... CCFLAGS use:
  200. -      -DMACOS_X
  201. -        if you want a normal MacOS X version (using os_mac.c)
  202. -      -DMACOS_X_UNIX
  203. -        if you want to use shell commands (using os_unix.c)
  204. -        NOTE: some functionality may be missing
  205. -  4. Hammer the build button in ;)
  206. - A.4: Using the unix compiler.
  207. -  From Terminal.app you can use "configure" and "make". Refer to INSTALL for
  208. -  full detail. The MacOS port is not involve here.
  209.   
  210.   ------------------------------------------------------
  211.   
  212. --- 109,114 ----
  213. *** ../vim-6.2.123/src/Makefile    Tue Oct 14 10:36:08 2003
  214. --- src/Makefile    Thu Oct 16 12:56:23 2003
  215. ***************
  216. *** 2307,2315 ****
  217.   ### MacOS X installation
  218.   ###
  219.   ### This creates a runnable Vim.app in the src directory
  220. - ###
  221. - ### TODO: install the runtime files in Vim.app instead of
  222. - ### requiring that they be in a seperate directory.
  223.   
  224.   REZ    = /Developer/Tools/Rez
  225.   RESMRG = /Developer/Tools/ResMerger
  226. --- 2307,2312 ----
  227. ***************
  228. *** 2320,2338 ****
  229.   VERSION = 6.2
  230.   
  231.   ### Common flags
  232. ! M4FLAGS = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
  233.           -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
  234.   
  235.   ### Icons
  236. ! # You can download Douglas Stebila's icons:
  237. ! #    http://homepage.mac.com/dstebila/code/vim/
  238. ! # TODO: Honestly, why don't we just go ahead and do this? OS 9?
  239. ! # If you place those *.icns at src directory, it will be detected by this
  240. ! # Makefile automatically, and used for Vim.
  241. ! ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi)
  242. ! ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi)
  243. ! ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi)
  244. ! ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT))
  245.   
  246.   install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \
  247.       bundle-language
  248. --- 2317,2335 ----
  249.   VERSION = 6.2
  250.   
  251.   ### Common flags
  252. ! M4FLAGSX = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
  253.           -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
  254.   
  255.   ### Icons
  256. ! ICON_APP = gui_mac.icns
  257. ! ICONS = $(RESDIR)/$(ICON_APP)
  258. ! # If you uncomment the following lines the *.icns in the src directory will be
  259. ! # detected by this Makefile automatically, and used for Vim.
  260. ! #ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi)
  261. ! #ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi)
  262. ! #ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi)
  263. ! #ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT))
  264.   
  265.   install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \
  266.       bundle-language
  267. ***************
  268. *** 2347,2353 ****
  269.       @echo "Creating PkgInfo"
  270.       @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo
  271.       @echo "Creating Info.plist"
  272. !     m4 $(M4FLAGS) infplist.xml > $(APPDIR)/Contents/Info.plist
  273.   
  274.   bundle-resource: bundle-dir bundle-icons bundle-rsrc
  275.   
  276. --- 2344,2350 ----
  277.       @echo "Creating PkgInfo"
  278.       @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo
  279.       @echo "Creating Info.plist"
  280. !     m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist
  281.   
  282.   bundle-resource: bundle-dir bundle-icons bundle-rsrc
  283.   
  284. *** ../vim-6.2.123/src/misc1.c    Sat Sep 27 19:48:50 2003
  285. --- src/misc1.c    Wed Oct 15 11:30:39 2003
  286. ***************
  287. *** 20,28 ****
  288.   
  289.   static char_u *vim_version_dir __ARGS((char_u *vimdir));
  290.   static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u *name));
  291. - #if defined(USE_EXE_NAME) && defined(MACOS_X)
  292. - static char_u *remove_tail_with_ext __ARGS((char_u *p, char_u *pend, char_u *name));
  293. - #endif
  294.   static int get_indent_str __ARGS((char_u *ptr, int ts));
  295.   static int copy_indent __ARGS((int size, char_u    *src));
  296.   
  297. --- 20,25 ----
  298. ***************
  299. *** 3398,3404 ****
  300.           if (p == exe_name)
  301.           {
  302.           pend = remove_tail(p, pend, (char_u *)"Contents/MacOS");
  303. -         pend = remove_tail_with_ext(p, pend, (char_u *)".app");
  304.           pend = remove_tail(p, pend, (char_u *)"build");
  305.           }
  306.   # endif
  307. --- 3399,3404 ----
  308. ***************
  309. *** 3544,3573 ****
  310.       return newend;
  311.       return pend;
  312.   }
  313. - #if defined(USE_EXE_NAME) && defined(MACOS_X)
  314. - /*
  315. -  * If the string between "p" and "pend" ends in "???.ext/", return "pend" minus
  316. -  * the length of "???.ext/".  Otherwise return "pend".
  317. -  */
  318. -     static char_u *
  319. - remove_tail_with_ext(p, pend, ext)
  320. -     char_u    *p;
  321. -     char_u    *pend;
  322. -     char_u    *ext;
  323. - {
  324. -     int        len = (int)STRLEN(ext) + 1;
  325. -     char_u    *newend = pend - len;
  326. -     if (newend >= p
  327. -         && fnamencmp(newend, ext, len - 1) == 0)
  328. -     for (;newend != p && !vim_ispathsep(*(newend -1)); newend--);
  329. -     if (newend == p || vim_ispathsep(*(newend - 1)))
  330. -     return newend;
  331. -     return pend;
  332. - }
  333. - #endif
  334.   
  335.   /*
  336.    * Call expand_env() and store the result in an allocated string.
  337. --- 3544,3549 ----
  338. *** ../vim-6.2.123/src/version.c    Fri Oct 17 12:01:21 2003
  339. --- src/version.c    Fri Oct 17 12:05:52 2003
  340. ***************
  341. *** 639,640 ****
  342. --- 639,642 ----
  343.   {   /* Add new patch number below this line */
  344. + /**/
  345. +     124,
  346.   /**/
  347.  
  348. -- 
  349. hundred-and-one symptoms of being an internet addict:
  350. 10E. You start counting in hex.
  351.  
  352.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  353. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  354. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  355.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  356.