Merge commit 'svn-vim'
[MacVim.git] / Makefile
blobf4090fafd70a6bb29b42a94744ed5f47cfb53777
1 # This Makefile has two purposes:
2 # 1. Starting the compilation of Vim for Unix.
3 # 2. Creating the various distribution files.
6 # 1. Using this Makefile without an argument will compile Vim for Unix.
8 # "make install" is also possible.
10 # NOTE: If this doesn't work properly, first change directory to "src" and use
11 # the Makefile there:
12 # cd src
13 # make [arguments]
14 # Noticed on AIX systems when using this Makefile: Trying to run "cproto" or
15 # something else after Vim has been compiled. Don't know why...
16 # Noticed on OS/390 Unix: Restarts configure.
18 # The first (default) target is "first". This will result in running
19 # "make first", so that the target from "src/auto/config.mk" is picked
20 # up properly when config didn't run yet. Doing "make all" before configure
21 # has run can result in compiling with $(CC) empty.
23 first:
24 @echo "Starting make in the src directory."
25 @echo "If there are problems, cd to the src directory and run make there"
26 cd src && $(MAKE) $@
28 # Some make programs use the last target for the $@ default; put the other
29 # targets separately to always let $@ expand to "first" by default.
30 all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
31 @echo "Starting make in the src directory."
32 @echo "If there are problems, cd to the src directory and run make there"
33 cd src && $(MAKE) $@
36 # 2. Create the various distributions:
38 # TARGET PRODUCES CONTAINS
39 # unixall vim-#.#.tar.bz2 Runtime files and Sources for Unix
41 # extra vim-#.#-extra.tar.gz Extra source and runtime files
42 # lang vim-#.#-lang.tar.gz multi-language files
44 # html vim##html.zip HTML docs
46 # amisrc vim##src.tgz sources for Amiga
47 # amirt vim##rt.tgz runtime for Amiga
48 # amibin vim##bin.tgz binary for Amiga
50 # dossrc vim##src.zip sources for MS-DOS
51 # dosrt vim##rt.zip runtime for MS-DOS
52 # dosbin vim##d16.zip binary for MS-DOS 16 bits
53 # vim##d32.zip binary for MS-DOS 32 bits
54 # vim##w32.zip binary for Win32
55 # gvim##.zip binary for GUI Win32
56 # gvim##ole.zip OLE exe for Win32 GUI
57 # gvim##_s.zip exe for Win32s GUI
58 # doslang vim##lang.zip language files for Win32
60 # os2bin vim##os2.zip binary for OS/2
61 # (use RT from dosrt)
63 # farsi farsi##.zip Farsi fonts
65 # All output files are created in the "dist" directory. Existing files are
66 # overwritten!
67 # To do all this you need the unix, extra and lang archives, and
68 # compiled binaries.
69 # Before creating an archive first delete all backup files, *.orig, etc.
71 MAJOR = 7
72 MINOR = 1
74 # Uncomment this line if the Win32s version is to be included.
75 DOSBIN_S = dosbin_s
77 # CHECKLIST for creating a new version:
79 # - Update Vim version number. For a test version in: src/version.h, Contents,
80 # MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
81 # runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
82 # minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
83 # - Correct included_patches[] in src/version.c.
84 # - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
85 # work), Cscope and "huge" features. Exclude workshop and SNiFF.
86 # - With these features: "make proto" (requires cproto and Motif installed;
87 # ignore warnings for missing include files, fix problems for syntax errors).
88 # - With these features: "make depend" (works best with gcc).
89 # - "make lint" and check the output (ignore GTK warnings).
90 # - Enable the efence library in "src/Makefile" and run "make test". May
91 # require disabling Python and Ruby to avoid trouble with threads.
92 # - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
93 # - Check for missing options in runtime/optwin.vim et al. (with check.vim).
94 # - Do "make menu" to update the runtime/synmenu.vim file.
95 # - Add remarks for changes to runtime/doc/version7.txt.
96 # - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
97 # ADDITIONS".
98 # - In runtime/doc run "make" and "make html" to check for errors.
99 # - Check if src/Makefile and src/feature.h don't contain any personal
100 # preferences or the GTK, Perl, etc. mentioned above.
101 # - Check file protections to be "644" for text and "755" for executables (run
102 # the "check" script).
103 # - Check compiling on Amiga, MS-DOS and MS-Windows.
104 # - Delete all *~, *.sw?, *.orig, *.rej files
105 # - "make unixall", "make extra", "make lang", "make html"
106 # - Make diff files against the previous release: "makediff7 7.1 7.2"
108 # Amiga:
109 # - "make amisrc", move the archive to the Amiga and compile:
110 # "make -f Make_manx.mak" (will use "big" features by default).
111 # - Run the tests: "make -f Make_manx.mak test"
112 # - Place the executables Vim and Xxd in this directory (set the executable
113 # flag).
114 # - "make amirt", "make amibin".
116 # PC:
117 # - "make dossrc" and "make dosrt". Unpack the archives on a PC.
118 # 16 bit DOS version:
119 # - Set environment for compiling with Borland C++ 3.1.
120 # - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
121 # case set environment for compiling with Borland C++ 4.0 and do
122 # "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
123 # - "make test" and check the output.
124 # - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
125 # "uninstald16.exe".
126 # 32 bit DOS version:
127 # - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
128 # - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
129 # - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
130 # "uninstald32.exe".
131 # Win32 console version:
132 # - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
133 # paths when necessary).
134 # - "nmake -f Make_mvc.mak"
135 # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
136 # - Rename the executables to "vimw32.exe", "xxdw32.exe".
137 # - Rename vim.pdb to vimw32.pdb.
138 # - When building the Win32s version later, delete vimrun.exe, install.exe and
139 # uninstal.exe. Otherwise rename executables to installw32.exe and
140 # uninstalw32.exe.
141 # Win32 GUI version:
142 # - "nmake -f Make_mvc.mak GUI=yes.
143 # - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
144 # - Move gvim.pdb to here.
145 # - Delete vimrun.exe, install.exe and uninstal.exe.
146 # - Copy "GvimExt/gvimext.dll" to here.
147 # Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
148 # - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
149 # - Rename "gvim.exe" to "gvim_ole.exe".
150 # - Rename gvim.pdb to "gvim_ole.pdb".
151 # - Delete install.exe and uninstal.exe.
152 # - If building the Win32s version delete vimrun.exe.
153 # Win32s GUI version:
154 # - Set environment for Visual C++ 4.1 (requires a new console window)
155 # - "vcvars32" (use the path for VC 4.1 e:\msdev\bin)
156 # - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1)
157 # - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1)
158 # - Rename "gvim.exe" to "gvim_w32s.exe".
159 # - Rename "install.exe" to "installw32.exe"
160 # - Rename "uninstal.exe" to "uninstalw32.exe"
161 # - The produced uninstalw32.exe and vimrun.exe are used.
162 # Create the archives:
163 # - Copy all the "*.exe" files to where this Makefile is.
164 # - Copy all the "*.pdb" files to where this Makefile is.
165 # - "make dosbin".
166 # - Run make on Unix to update the ".mo" files.
167 # - "make doslang".
168 # NSIS self installing exe:
169 # - Unpack the doslang archive on the PC.
170 # - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
171 # uninstalw32.exe and xxdw32.exe have been build as mentioned above.
172 # - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
173 # from a binary archive or build them)
174 # Note: VisVim needs to be build with MSVC 5, newer versions don't work.
175 # - make sure there is a diff.exe two levels up
176 # - go to ../nsis and do "makensis gvim.nsi".
177 # - Copy gvim##.exe to the dist directory.
179 # OS/2:
180 # - Unpack the Unix "src", "extra" and "rt" archives.
181 # - "make -f Make_os2.mak".
182 # - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
183 # them to here.
184 # - "make os2bin".
186 VIMVER = vim-$(MAJOR).$(MINOR)
187 VERSION = $(MAJOR)$(MINOR)
188 VDOT = $(MAJOR).$(MINOR)
189 VIMRTDIR = vim$(VERSION)
191 # Vim used for conversion from "unix" to "dos"
192 VIM = vim
194 # How to include Filelist depends on the version of "make" you have.
195 # If the current choice doesn't work, try the other one.
197 include Filelist
198 #.include "Filelist"
201 # All output is put in the "dist" directory.
202 dist:
203 mkdir dist
205 # Clean up some files to avoid they are included.
206 prepare:
207 if test -f runtime/doc/uganda.nsis.txt; then \
208 rm runtime/doc/uganda.nsis.txt; fi
210 # For the zip files we need to create a file with the comment line
211 dist/comment:
212 mkdir dist/comment
214 COMMENT_RT = comment/$(VERSION)-rt
215 COMMENT_RT1 = comment/$(VERSION)-rt1
216 COMMENT_RT2 = comment/$(VERSION)-rt2
217 COMMENT_D16 = comment/$(VERSION)-bin-d16
218 COMMENT_D32 = comment/$(VERSION)-bin-d32
219 COMMENT_W32 = comment/$(VERSION)-bin-w32
220 COMMENT_GVIM = comment/$(VERSION)-bin-gvim
221 COMMENT_OLE = comment/$(VERSION)-bin-ole
222 COMMENT_W32S = comment/$(VERSION)-bin-w32s
223 COMMENT_SRC = comment/$(VERSION)-src
224 COMMENT_OS2 = comment/$(VERSION)-bin-os2
225 COMMENT_HTML = comment/$(VERSION)-html
226 COMMENT_FARSI = comment/$(VERSION)-farsi
227 COMMENT_LANG = comment/$(VERSION)-lang
229 dist/$(COMMENT_RT): dist/comment
230 echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
232 dist/$(COMMENT_RT1): dist/comment
233 echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 1) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT1)
235 dist/$(COMMENT_RT2): dist/comment
236 echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 2) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT2)
238 dist/$(COMMENT_D16): dist/comment
239 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
241 dist/$(COMMENT_D32): dist/comment
242 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 32 bit protected mode" > dist/$(COMMENT_D32)
244 dist/$(COMMENT_W32): dist/comment
245 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
247 dist/$(COMMENT_GVIM): dist/comment
248 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
250 dist/$(COMMENT_OLE): dist/comment
251 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
253 dist/$(COMMENT_W32S): dist/comment
254 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows 3.1/3.11" > dist/$(COMMENT_W32S)
256 dist/$(COMMENT_SRC): dist/comment
257 echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
259 dist/$(COMMENT_OS2): dist/comment
260 echo "Vim - Vi IMproved - v$(VDOT) binaries + runtime files for OS/2" > dist/$(COMMENT_OS2)
262 dist/$(COMMENT_HTML): dist/comment
263 echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
265 dist/$(COMMENT_FARSI): dist/comment
266 echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
268 dist/$(COMMENT_LANG): dist/comment
269 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
271 unixall: dist prepare
272 -rm -f dist/$(VIMVER).tar.bz2
273 -rm -rf dist/$(VIMRTDIR)
274 mkdir dist/$(VIMRTDIR)
275 tar cf - \
276 $(RT_ALL) \
277 $(RT_ALL_BIN) \
278 $(RT_UNIX) \
279 $(RT_UNIX_DOS_BIN) \
280 $(RT_SCRIPTS) \
281 $(LANG_GEN) \
282 $(LANG_GEN_BIN) \
283 $(SRC_ALL) \
284 $(SRC_UNIX) \
285 $(SRC_DOS_UNIX) \
286 | (cd dist/$(VIMRTDIR); tar xf -)
287 # Need to use a "distclean" config.mk file
288 cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
289 # Create an empty config.h file, make dependencies require it
290 touch dist/$(VIMRTDIR)/src/auto/config.h
291 # Make sure configure is newer than config.mk to force it to be generated
292 touch dist/$(VIMRTDIR)/src/configure
293 cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
294 bzip2 dist/$(VIMVER).tar
296 extra: dist prepare
297 -rm -f dist/$(VIMVER)-extra.tar.gz
298 -rm -rf dist/$(VIMRTDIR)
299 mkdir dist/$(VIMRTDIR)
300 tar cf - \
301 $(EXTRA) \
302 | (cd dist/$(VIMRTDIR); tar xf -)
303 cd dist && tar cf $(VIMVER)-extra.tar $(VIMRTDIR)
304 gzip -9 dist/$(VIMVER)-extra.tar
306 lang: dist prepare
307 -rm -f dist/$(VIMVER)-lang.tar.gz
308 -rm -rf dist/$(VIMRTDIR)
309 mkdir dist/$(VIMRTDIR)
310 tar cf - \
311 $(LANG_SRC) \
312 | (cd dist/$(VIMRTDIR); tar xf -)
313 # Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
314 # Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
315 touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
316 touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
317 touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
318 touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
319 touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
320 touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
321 touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
322 cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
323 gzip -9 dist/$(VIMVER)-lang.tar
325 amirt: dist prepare
326 -rm -f dist/vim$(VERSION)rt.tar.gz
327 -rm -rf dist/Vim
328 mkdir dist/Vim
329 mkdir dist/Vim/$(VIMRTDIR)
330 tar cf - \
331 $(ROOT_AMI) \
332 $(RT_ALL) \
333 $(RT_ALL_BIN) \
334 $(RT_SCRIPTS) \
335 $(RT_AMI) \
336 $(RT_NO_UNIX) \
337 $(RT_AMI_DOS) \
338 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
339 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
340 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
341 mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
342 rmdir dist/Vim/$(VIMRTDIR)/runtime
343 cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
344 gzip -9 dist/vim$(VERSION)rt.tar
345 mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
347 amibin: dist prepare
348 -rm -f dist/vim$(VERSION)bin.tar.gz
349 -rm -rf dist/Vim
350 mkdir dist/Vim
351 mkdir dist/Vim/$(VIMRTDIR)
352 tar cf - \
353 $(ROOT_AMI) \
354 $(BIN_AMI) \
355 Vim \
356 Xxd \
357 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
358 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
359 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
360 cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
361 gzip -9 dist/vim$(VERSION)bin.tar
362 mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
364 amisrc: dist prepare
365 -rm -f dist/vim$(VERSION)src.tar.gz
366 -rm -rf dist/Vim
367 mkdir dist/Vim
368 mkdir dist/Vim/$(VIMRTDIR)
369 tar cf - \
370 $(ROOT_AMI) \
371 $(SRC_ALL) \
372 $(SRC_AMI) \
373 $(SRC_AMI_DOS) \
374 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
375 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
376 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
377 cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
378 gzip -9 dist/vim$(VERSION)src.tar
379 mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
381 no_title.vim: Makefile
382 echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
384 dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
385 -rm -rf dist/vim$(VERSION)rt.zip
386 cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
388 # Split in two parts to avoid a "argument list too long" error.
389 dosrt_unix2dos: dist prepare no_title.vim
390 -rm -rf dist/vim
391 mkdir dist/vim
392 mkdir dist/vim/$(VIMRTDIR)
393 tar cf - \
394 $(RT_ALL) \
395 | (cd dist/vim/$(VIMRTDIR); tar xf -)
396 tar cf - \
397 $(RT_SCRIPTS) \
398 $(RT_DOS) \
399 $(RT_NO_UNIX) \
400 $(RT_AMI_DOS) \
401 $(LANG_GEN) \
402 | (cd dist/vim/$(VIMRTDIR); tar xf -)
403 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
404 tar cf - \
405 $(RT_UNIX_DOS_BIN) \
406 $(RT_ALL_BIN) \
407 $(RT_DOS_BIN) \
408 $(LANG_GEN_BIN) \
409 | (cd dist/vim/$(VIMRTDIR); tar xf -)
410 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
411 rmdir dist/vim/$(VIMRTDIR)/runtime
414 # Convert runtime files from Unix fileformat to dos fileformat.
415 # Used before uploading. Don't delete the AAPDIR/sign files!
416 runtime_unix2dos: dosrt_unix2dos
417 -rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
418 cd dist/vim/$(VIMRTDIR); tar cf - * \
419 | (cd ../../../runtime/dos; tar xf -)
421 dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_d16 dosbin_ole $(DOSBIN_S)
423 # make Win32 gvim
424 dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
425 -rm -rf dist/gvim$(VERSION).zip
426 -rm -rf dist/vim
427 mkdir dist/vim
428 mkdir dist/vim/$(VIMRTDIR)
429 tar cf - \
430 $(BIN_DOS) \
431 | (cd dist/vim/$(VIMRTDIR); tar xf -)
432 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
433 cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
434 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
435 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
436 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
437 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
438 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
439 cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
440 cp gvim.pdb dist/gvim$(VERSION).pdb
442 # make Win32 console
443 dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
444 -rm -rf dist/vim$(VERSION)w32.zip
445 -rm -rf dist/vim
446 mkdir dist/vim
447 mkdir dist/vim/$(VIMRTDIR)
448 tar cf - \
449 $(BIN_DOS) \
450 | (cd dist/vim/$(VIMRTDIR); tar xf -)
451 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
452 cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
453 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
454 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
455 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
456 cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
457 cp vimw32.pdb dist/vim$(VERSION)w32.pdb
459 # make 32bit DOS
460 dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
461 -rm -rf dist/vim$(VERSION)d32.zip
462 -rm -rf dist/vim
463 mkdir dist/vim
464 mkdir dist/vim/$(VIMRTDIR)
465 tar cf - \
466 $(BIN_DOS) \
467 | (cd dist/vim/$(VIMRTDIR); tar xf -)
468 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
469 cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
470 cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
471 cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
472 cp uninstald32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
473 cp csdpmi4b.zip dist/vim/$(VIMRTDIR)
474 cd dist && zip -9 -rD -z vim$(VERSION)d32.zip vim <$(COMMENT_D32)
476 # make 16bit DOS
477 dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
478 -rm -rf dist/vim$(VERSION)d16.zip
479 -rm -rf dist/vim
480 mkdir dist/vim
481 mkdir dist/vim/$(VIMRTDIR)
482 tar cf - \
483 $(BIN_DOS) \
484 | (cd dist/vim/$(VIMRTDIR); tar xf -)
485 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
486 cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
487 cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
488 cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
489 cp uninstald16.exe dist/vim/$(VIMRTDIR)/uninstal.exe
490 cd dist && zip -9 -rD -z vim$(VERSION)d16.zip vim <$(COMMENT_D16)
492 # make Win32 gvim with OLE
493 dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
494 -rm -rf dist/gvim$(VERSION)ole.zip
495 -rm -rf dist/vim
496 mkdir dist/vim
497 mkdir dist/vim/$(VIMRTDIR)
498 tar cf - \
499 $(BIN_DOS) \
500 | (cd dist/vim/$(VIMRTDIR); tar xf -)
501 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
502 cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
503 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
504 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
505 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
506 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
507 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
508 cp README_ole.txt dist/vim/$(VIMRTDIR)
509 cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
510 cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
511 cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
512 cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
514 # make Win32s gvim
515 dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
516 -rm -rf dist/gvim$(VERSION)_s.zip
517 -rm -rf dist/vim
518 mkdir dist/vim
519 mkdir dist/vim/$(VIMRTDIR)
520 tar cf - \
521 $(BIN_DOS) \
522 | (cd dist/vim/$(VIMRTDIR); tar xf -)
523 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
524 cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
525 cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
526 cp README_w32s.txt dist/vim/$(VIMRTDIR)
527 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
528 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
529 cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
531 # make Win32 lang archive
532 doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
533 -rm -rf dist/vim$(VERSION)lang.zip
534 -rm -rf dist/vim
535 mkdir dist/vim
536 mkdir dist/vim/$(VIMRTDIR)
537 mkdir dist/vim/$(VIMRTDIR)/lang
538 cd src && MAKEMO=yes $(MAKE) languages
539 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
540 # Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
541 # Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
542 # zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
543 for i in $(LANG_DOS); do \
544 if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
545 n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
546 mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
547 mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
548 cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
549 fi \
550 done
551 cp libintl.dll dist/vim/$(VIMRTDIR)/
552 cd dist && zip -9 -rD -z vim$(VERSION)lang.zip vim <$(COMMENT_LANG)
554 # MS-DOS sources
555 dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
556 -rm -rf dist/vim$(VERSION)src.zip
557 -rm -rf dist/vim
558 mkdir dist/vim
559 mkdir dist/vim/$(VIMRTDIR)
560 tar cf - \
561 $(SRC_ALL) \
562 $(SRC_DOS) \
563 $(SRC_AMI_DOS) \
564 $(SRC_DOS_UNIX) \
565 runtime/doc/uganda.nsis.txt \
566 | (cd dist/vim/$(VIMRTDIR); tar xf -)
567 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
568 rmdir dist/vim/$(VIMRTDIR)/runtime
569 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
570 tar cf - \
571 $(SRC_DOS_BIN) \
572 | (cd dist/vim/$(VIMRTDIR); tar xf -)
573 cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
575 runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
576 cd runtime/doc && $(MAKE) uganda.nsis.txt
578 os2bin: dist no_title.vim dist/$(COMMENT_OS2)
579 -rm -rf dist/vim$(VERSION)os2.zip
580 -rm -rf dist/vim
581 mkdir dist/vim
582 mkdir dist/vim/$(VIMRTDIR)
583 tar cf - \
584 $(BIN_OS2) \
585 | (cd dist/vim/$(VIMRTDIR); tar xf -)
586 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
587 cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
588 cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
589 cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
590 cp emx.dll emxlibcs.dll dist/vim/$(VIMRTDIR)
591 cd dist && zip -9 -rD -z vim$(VERSION)os2.zip vim <$(COMMENT_OS2)
593 html: dist dist/$(COMMENT_HTML)
594 -rm -rf dist/vim$(VERSION)html.zip
595 cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
597 farsi: dist dist/$(COMMENT_FARSI)
598 -rm -f dist/farsi$(VERSION).zip
599 zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)