xref: /vim-8.2.3635/Makefile (revision 899dddf8)
1# This Makefile has two purposes:
2# 1. Starting the compilation of Vim for Unix.
3# 2. Creating the various distribution files.
4
5
6# 1. Using this Makefile without an argument will compile Vim for Unix.
7#
8# "make install" is also possible.
9#
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.
17#
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.
22
23first:
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) $@
27
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.
30all install uninstall tools config configure 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) $@
34
35
36# 2. Create the various distributions:
37#
38# TARGET	PRODUCES		CONTAINS
39# unixall	vim-#.#.tar.bz2		Runtime files and Sources for Unix
40#
41# extra		vim-#.#-extra.tar.gz	Extra source and runtime files
42# lang		vim-#.#-lang.tar.gz	multi-language files
43#
44# html		vim##html.zip		HTML docs
45#
46# amisrc	vim##src.tgz		sources for Amiga
47# amirt		vim##rt.tgz		runtime for Amiga
48# amibin	vim##bin.tgz		binary for Amiga
49#
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
59#
60# os2bin	vim##os2.zip		binary for OS/2
61#					(use RT from dosrt)
62#
63# farsi		farsi##.zip		Farsi fonts
64#
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.
70
71MAJOR = 7
72MINOR = 0b
73
74# Uncomment this line if the Win32s version is to be included.
75DOSBIN_S =  dosbin_s
76
77# CHECKLIST for creating a new version:
78#
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, Cscope and "huge"
85#   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 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# - In runtime/doc run "make" and "make html" to check for errors.
97# - Check if src/Makefile and src/feature.h don't contain any personal
98#   preferences or the GTK, Perl, etc. mentioned above.
99# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
100#   ADDITIONS".
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#
107# Amiga:
108# - "make amisrc", move the archive to the Amiga and compile:
109#   "make -f Make_manx.mak" (will use "big" features by default).
110# - Run the tests: "make -f Make_manx.mak test"
111# - Place the executables Vim and Xxd in this directory (set the executable
112#   flag).
113# - "make amirt", "make amibin".
114#
115# PC:
116# - "make dossrc" and "make dosrt".  Unpack the archives on a PC.
117# 16 bit DOS version:
118# - Set environment for compiling with Borland C++ 3.1.
119# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
120#   case set environment for compiling with Borland C++ 4.0 and do
121#   "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
122# - "make test" and check the output.
123# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
124#   "uninstald16.exe".
125# 32 bit DOS version:
126# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
127# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
128# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
129#   "uninstald32.exe".
130# Win32 console version:
131# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
132# - "nmake -f Make_mvc.mak"
133# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
134# - Rename the executables to "vimw32.exe", "xxdw32.exe".
135# - Rename ObjC/vim.pdb to vimw32.pdb.
136# - When building the Win32s version later, delete vimrun.exe, install.exe and
137#   uninstal.exe.  Otherwise rename executables to installw32.exe and
138#   uninstalw32.exe.
139# Win32 GUI version:
140# - "nmake -f Make_mvc.mak GUI=yes.
141# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
142# - Move ObjG/gvim.pdb to here.
143# - Delete vimrun.exe, install.exe and uninstall.exe.
144# - Copy "GvimExt/gvimext.dll" to here.
145# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
146# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
147# - Rename "gvim.exe" to "gvim_ole.exe".
148# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
149# - Delete install.exe and uninstall.exe.
150# - If building the Win32s version delete vimrun.exe.
151# Win32s GUI version:
152# - Set environment for Visual C++ 4.1 (requires a new console window)
153# - "vcvars32" (use the path for VC 4.1 e:\msdev\bin)
154# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1)
155# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1)
156# - Rename "gvim.exe" to "gvim_w32s.exe".
157# - Rename "install.exe" to "installw32.exe"
158# - Rename "uninstal.exe" to "uninstalw32.exe"
159# - The produced uninstalw32.exe and vimrun.exe are used.
160# Create the archives:
161# - Copy all the "*.exe" files to where this Makefile is.
162# - "make dosbin".
163# - Run make on Unix to update the ".mo" files.
164# - "make doslang".
165# NSIS self installing exe:
166# - Unpack the doslang archive on the PC.
167# - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
168#   uninstalw32.exe and xxdw32.exe have been build as mentioned above.
169# - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
170#   from a binary archive or build them)
171# - make sure there is a diff.exe two levels up
172# - go to ../nsis and do "makensis gvim.nsi".
173# - Copy gvim##.exe to the dist directory.
174#
175# OS/2:
176# - Unpack the Unix "src", "extra" and "rt" archives.
177# - "make -f Make_os2.mak".
178# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
179#   them to here.
180# - "make os2bin".
181
182VIMVER	= vim-$(MAJOR).$(MINOR)
183VERSION = $(MAJOR)$(MINOR)
184VDOT	= $(MAJOR).$(MINOR)
185VIMRTDIR = vim$(VERSION)
186
187# Vim used for conversion from "unix" to "dos"
188VIM	= vim
189
190# How to include Filelist depends on the version of "make" you have.
191# If the current choice doesn't work, try the other one.
192
193include Filelist
194#.include "Filelist"
195
196
197# All output is put in the "dist" directory.
198dist:
199	mkdir dist
200
201# Clean up some files to avoid they are included.
202prepare:
203	if test -f runtime/doc/uganda.nsis.txt; then \
204		rm runtime/doc/uganda.nsis.txt; fi
205
206# For the zip files we need to create a file with the comment line
207dist/comment:
208	mkdir dist/comment
209
210COMMENT_RT = comment/$(VERSION)-rt
211COMMENT_RT1 = comment/$(VERSION)-rt1
212COMMENT_RT2 = comment/$(VERSION)-rt2
213COMMENT_D16 = comment/$(VERSION)-bin-d16
214COMMENT_D32 = comment/$(VERSION)-bin-d32
215COMMENT_W32 = comment/$(VERSION)-bin-w32
216COMMENT_GVIM = comment/$(VERSION)-bin-gvim
217COMMENT_OLE = comment/$(VERSION)-bin-ole
218COMMENT_W32S = comment/$(VERSION)-bin-w32s
219COMMENT_SRC = comment/$(VERSION)-src
220COMMENT_OS2 = comment/$(VERSION)-bin-os2
221COMMENT_HTML = comment/$(VERSION)-html
222COMMENT_FARSI = comment/$(VERSION)-farsi
223COMMENT_LANG = comment/$(VERSION)-lang
224
225dist/$(COMMENT_RT): dist/comment
226	echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
227
228dist/$(COMMENT_RT1): dist/comment
229	echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 1) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT1)
230
231dist/$(COMMENT_RT2): dist/comment
232	echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 2) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT2)
233
234dist/$(COMMENT_D16): dist/comment
235	echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
236
237dist/$(COMMENT_D32): dist/comment
238	echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 32 bit protected mode" > dist/$(COMMENT_D32)
239
240dist/$(COMMENT_W32): dist/comment
241	echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
242
243dist/$(COMMENT_GVIM): dist/comment
244	echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
245
246dist/$(COMMENT_OLE): dist/comment
247	echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
248
249dist/$(COMMENT_W32S): dist/comment
250	echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows 3.1/3.11" > dist/$(COMMENT_W32S)
251
252dist/$(COMMENT_SRC): dist/comment
253	echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
254
255dist/$(COMMENT_OS2): dist/comment
256	echo "Vim - Vi IMproved - v$(VDOT) binaries + runtime files for OS/2" > dist/$(COMMENT_OS2)
257
258dist/$(COMMENT_HTML): dist/comment
259	echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
260
261dist/$(COMMENT_FARSI): dist/comment
262	echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
263
264dist/$(COMMENT_LANG): dist/comment
265	echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
266
267unixall: dist prepare
268	-rm -f dist/$(VIMVER).tar.bz2
269	-rm -rf dist/$(VIMRTDIR)
270	mkdir dist/$(VIMRTDIR)
271	tar cf - \
272		$(RT_ALL) \
273		$(RT_ALL_BIN) \
274		$(RT_UNIX) \
275		$(RT_UNIX_DOS_BIN) \
276		$(RT_SCRIPTS) \
277		$(LANG_GEN) \
278		$(LANG_GEN_BIN) \
279		$(SRC_ALL) \
280		$(SRC_UNIX) \
281		$(SRC_DOS_UNIX) \
282		| (cd dist/$(VIMRTDIR); tar xf -)
283# Need to use a "distclean" config.mk file
284	cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
285# Create an empty config.h file, make dependencies require it
286	touch dist/$(VIMRTDIR)/src/auto/config.h
287# Make sure configure is newer than config.mk to force it to be generated
288	touch dist/$(VIMRTDIR)/src/configure
289	cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
290	bzip2 dist/$(VIMVER).tar
291
292extra: dist prepare
293	-rm -f dist/$(VIMVER)-extra.tar.gz
294	-rm -rf dist/$(VIMRTDIR)
295	mkdir dist/$(VIMRTDIR)
296	tar cf - \
297		$(EXTRA) \
298		| (cd dist/$(VIMRTDIR); tar xf -)
299	cd dist && tar cf $(VIMVER)-extra.tar $(VIMRTDIR)
300	gzip -9 dist/$(VIMVER)-extra.tar
301
302lang: dist prepare
303	-rm -f dist/$(VIMVER)-lang.tar.gz
304	-rm -rf dist/$(VIMRTDIR)
305	mkdir dist/$(VIMRTDIR)
306	tar cf - \
307		$(LANG_SRC) \
308		| (cd dist/$(VIMRTDIR); tar xf -)
309# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
310# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
311	touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
312	touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
313	touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
314	touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
315	touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
316	touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
317	touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
318	cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
319	gzip -9 dist/$(VIMVER)-lang.tar
320
321amirt: dist prepare
322	-rm -f dist/vim$(VERSION)rt.tar.gz
323	-rm -rf dist/Vim
324	mkdir dist/Vim
325	mkdir dist/Vim/$(VIMRTDIR)
326	tar cf - \
327		$(ROOT_AMI) \
328		$(RT_ALL) \
329		$(RT_ALL_BIN) \
330		$(RT_SCRIPTS) \
331		$(RT_AMI) \
332		$(RT_NO_UNIX) \
333		$(RT_AMI_DOS) \
334		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
335	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
336	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
337	mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
338	rmdir dist/Vim/$(VIMRTDIR)/runtime
339	cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
340	gzip -9 dist/vim$(VERSION)rt.tar
341	mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
342
343amibin: dist prepare
344	-rm -f dist/vim$(VERSION)bin.tar.gz
345	-rm -rf dist/Vim
346	mkdir dist/Vim
347	mkdir dist/Vim/$(VIMRTDIR)
348	tar cf - \
349		$(ROOT_AMI) \
350		$(BIN_AMI) \
351		Vim \
352		Xxd \
353		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
354	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
355	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
356	cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
357	gzip -9 dist/vim$(VERSION)bin.tar
358	mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
359
360amisrc: dist prepare
361	-rm -f dist/vim$(VERSION)src.tar.gz
362	-rm -rf dist/Vim
363	mkdir dist/Vim
364	mkdir dist/Vim/$(VIMRTDIR)
365	tar cf - \
366		$(ROOT_AMI) \
367		$(SRC_ALL) \
368		$(SRC_AMI) \
369		$(SRC_AMI_DOS) \
370		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
371	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
372	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
373	cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
374	gzip -9 dist/vim$(VERSION)src.tar
375	mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
376
377no_title.vim: Makefile
378	echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
379
380dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
381	-rm -rf dist/vim$(VERSION)rt.zip
382	cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
383
384# Split in two parts to avoid a "argument list too long" error.
385dosrt_unix2dos: dist prepare no_title.vim
386	-rm -rf dist/vim
387	mkdir dist/vim
388	mkdir dist/vim/$(VIMRTDIR)
389	tar cf - \
390		$(RT_ALL) \
391		| (cd dist/vim/$(VIMRTDIR); tar xf -)
392	tar cf - \
393		$(RT_SCRIPTS) \
394		$(RT_DOS) \
395		$(RT_NO_UNIX) \
396		$(RT_AMI_DOS) \
397		$(LANG_GEN) \
398		| (cd dist/vim/$(VIMRTDIR); tar xf -)
399	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
400	tar cf - \
401		$(RT_UNIX_DOS_BIN) \
402		$(RT_ALL_BIN) \
403		$(RT_DOS_BIN) \
404		$(LANG_GEN_BIN) \
405		| (cd dist/vim/$(VIMRTDIR); tar xf -)
406	mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
407	rmdir dist/vim/$(VIMRTDIR)/runtime
408
409
410# Convert runtime files from Unix fileformat to dos fileformat.
411# Used before uploading.  Don't delete the AAPDIR/sign files!
412runtime_unix2dos: dosrt_unix2dos
413	-rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
414	cd dist/vim/$(VIMRTDIR); tar cf - * \
415		| (cd ../../../runtime/dos; tar xf -)
416
417dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_d16 dosbin_ole $(DOSBIN_S)
418
419# make Win32 gvim
420dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
421	-rm -rf dist/gvim$(VERSION).zip
422	-rm -rf dist/vim
423	mkdir dist/vim
424	mkdir dist/vim/$(VIMRTDIR)
425	tar cf - \
426		$(BIN_DOS) \
427		| (cd dist/vim/$(VIMRTDIR); tar xf -)
428	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
429	cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
430	cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
431	cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
432	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
433	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
434	cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
435	cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
436	cp gvim.pdb dist/gvim$(VERSION).pdb
437
438# make Win32 console
439dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
440	-rm -rf dist/vim$(VERSION)w32.zip
441	-rm -rf dist/vim
442	mkdir dist/vim
443	mkdir dist/vim/$(VIMRTDIR)
444	tar cf - \
445		$(BIN_DOS) \
446		| (cd dist/vim/$(VIMRTDIR); tar xf -)
447	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
448	cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
449	cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
450	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
451	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
452	cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
453	cp vimw32.pdb dist/vim$(VERSION)w32.pdb
454
455# make 32bit DOS
456dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
457	-rm -rf dist/vim$(VERSION)d32.zip
458	-rm -rf dist/vim
459	mkdir dist/vim
460	mkdir dist/vim/$(VIMRTDIR)
461	tar cf - \
462		$(BIN_DOS) \
463		| (cd dist/vim/$(VIMRTDIR); tar xf -)
464	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
465	cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
466	cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
467	cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
468	cp uninstald32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
469	cp csdpmi4b.zip dist/vim/$(VIMRTDIR)
470	cd dist && zip -9 -rD -z vim$(VERSION)d32.zip vim <$(COMMENT_D32)
471
472# make 16bit DOS
473dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
474	-rm -rf dist/vim$(VERSION)d16.zip
475	-rm -rf dist/vim
476	mkdir dist/vim
477	mkdir dist/vim/$(VIMRTDIR)
478	tar cf - \
479		$(BIN_DOS) \
480		| (cd dist/vim/$(VIMRTDIR); tar xf -)
481	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
482	cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
483	cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
484	cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
485	cp uninstald16.exe dist/vim/$(VIMRTDIR)/uninstal.exe
486	cd dist && zip -9 -rD -z vim$(VERSION)d16.zip vim <$(COMMENT_D16)
487
488# make Win32 gvim with OLE
489dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
490	-rm -rf dist/gvim$(VERSION)ole.zip
491	-rm -rf dist/vim
492	mkdir dist/vim
493	mkdir dist/vim/$(VIMRTDIR)
494	tar cf - \
495		$(BIN_DOS) \
496		| (cd dist/vim/$(VIMRTDIR); tar xf -)
497	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
498	cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
499	cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
500	cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
501	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
502	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
503	cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
504	cp README_ole.txt dist/vim/$(VIMRTDIR)
505	cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
506	cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
507	cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
508	cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
509
510# make Win32s gvim
511dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
512	-rm -rf dist/gvim$(VERSION)_s.zip
513	-rm -rf dist/vim
514	mkdir dist/vim
515	mkdir dist/vim/$(VIMRTDIR)
516	tar cf - \
517		$(BIN_DOS) \
518		| (cd dist/vim/$(VIMRTDIR); tar xf -)
519	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
520	cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
521	cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
522	cp README_w32s.txt dist/vim/$(VIMRTDIR)
523	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
524	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
525	cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
526
527# make Win32 lang archive
528doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
529	-rm -rf dist/vim$(VERSION)lang.zip
530	-rm -rf dist/vim
531	mkdir dist/vim
532	mkdir dist/vim/$(VIMRTDIR)
533	mkdir dist/vim/$(VIMRTDIR)/lang
534	cd src && MAKEMO=yes $(MAKE) languages
535	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
536# Add the message translations.  Trick: skip ja.mo and use ja.sjis.mo instead.
537# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
538# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
539	for i in $(LANG_DOS); do \
540	      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 \
541		n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
542		mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
543		mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
544		cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
545	      fi \
546	    done
547	cp libintl.dll dist/vim/$(VIMRTDIR)/
548	cd dist && zip -9 -rD -z vim$(VERSION)lang.zip vim <$(COMMENT_LANG)
549
550# MS-DOS sources
551dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
552	-rm -rf dist/vim$(VERSION)src.zip
553	-rm -rf dist/vim
554	mkdir dist/vim
555	mkdir dist/vim/$(VIMRTDIR)
556	tar cf - \
557		$(SRC_ALL) \
558		$(SRC_DOS) \
559		$(SRC_AMI_DOS) \
560		$(SRC_DOS_UNIX) \
561		runtime/doc/uganda.nsis.txt \
562		| (cd dist/vim/$(VIMRTDIR); tar xf -)
563	mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
564	rmdir dist/vim/$(VIMRTDIR)/runtime
565	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
566	tar cf - \
567		$(SRC_DOS_BIN) \
568		| (cd dist/vim/$(VIMRTDIR); tar xf -)
569	cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
570
571runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
572	cd runtime/doc && $(MAKE) uganda.nsis.txt
573
574os2bin: dist no_title.vim dist/$(COMMENT_OS2)
575	-rm -rf dist/vim$(VERSION)os2.zip
576	-rm -rf dist/vim
577	mkdir dist/vim
578	mkdir dist/vim/$(VIMRTDIR)
579	tar cf - \
580		$(BIN_OS2) \
581		| (cd dist/vim/$(VIMRTDIR); tar xf -)
582	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
583	cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
584	cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
585	cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
586	cp emx.dll emxlibcs.dll dist/vim/$(VIMRTDIR)
587	cd dist && zip -9 -rD -z vim$(VERSION)os2.zip vim <$(COMMENT_OS2)
588
589html: dist dist/$(COMMENT_HTML)
590	-rm -rf dist/vim$(VERSION)html.zip
591	cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
592
593farsi: dist dist/$(COMMENT_FARSI)
594	-rm -f dist/farsi$(VERSION).zip
595	zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)
596