xref: /vim-8.2.3635/Makefile (revision acecb3b9)
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#########################################################################
7# 1. Starting the compilation of Vim for Unix.
8#
9# Using this Makefile without an argument will compile Vim for Unix.
10# "make install" is also possible.
11#
12# NOTE: If this doesn't work properly, first change directory to "src" and use
13# the Makefile there:
14#	cd src
15#	make [arguments]
16# Noticed on AIX systems when using this Makefile: Trying to run "cproto" or
17# something else after Vim has been compiled.  Don't know why...
18# Noticed on OS/390 Unix: Restarts configure.
19#
20# The first (default) target is "first".  This will result in running
21# "make first", so that the target from "src/auto/config.mk" is picked
22# up properly when config didn't run yet.  Doing "make all" before configure
23# has run can result in compiling with $(CC) empty.
24
25first:
26	@if test ! -f src/auto/config.mk; then \
27		cp src/config.mk.dist src/auto/config.mk; \
28	fi
29	@echo "Starting make in the src directory."
30	@echo "If there are problems, cd to the src directory and run make there"
31	cd src && $(MAKE) $@
32
33# Some make programs use the last target for the $@ default; put the other
34# targets separately to always let $@ expand to "first" by default.
35all install uninstall tools config configure reconfig proto depend lint tags types test scripttests test_libvterm unittests testclean clean distclean:
36	@if test ! -f src/auto/config.mk; then \
37		cp src/config.mk.dist src/auto/config.mk; \
38	fi
39	@echo "Starting make in the src directory."
40	@echo "If there are problems, cd to the src directory and run make there"
41	cd src && $(MAKE) $@
42
43test: all
44	cd src && $(MAKE) test
45	cd runtime/indent && $(MAKE) clean && $(MAKE) test
46
47
48#########################################################################
49# 2. Creating the various distribution files.
50#
51# TARGET	PRODUCES		CONTAINS
52# unixall	vim-#.#.tar.bz2		All runtime files and sources, for Unix
53#
54# html		vim##html.zip		HTML docs
55#
56# dossrc	vim##src.zip		sources for MS-DOS
57# dosrt		vim##rt.zip		runtime for MS-DOS
58# dosbin	vim##w32.zip		binary for Win32
59#		gvim##.zip		binary for GUI Win32
60#		gvim##ole.zip		OLE exe for Win32 GUI
61#
62# OBSOLETE
63# amisrc	vim##src.tgz		sources for Amiga
64# amirt		vim##rt.tgz		runtime for Amiga
65# amibin	vim##bin.tgz		binary for Amiga
66#
67# farsi		farsi##.zip		Farsi fonts
68#
69#    All output files are created in the "dist" directory.  Existing files are
70#    overwritten!
71#    To do all this you need the Unix archive and compiled binaries.
72#    Before creating an archive first delete all backup files, *.orig, etc.
73
74MAJOR = 8
75MINOR = 1
76
77# CHECKLIST for creating a new version:
78#
79# - Update Vim version number.  For a test version in: src/version.h,
80#   READMEdir/Contents, MAJOR/MINOR above, VIMMAJOR and VIMMINOR in
81#   src/Makefile, README.txt, README.md, READMEdir/README*.txt,
82#   runtime/doc/*.txt and make nsis/gvim_version.nsh.
83#   For a minor/major version: src/GvimExt/GvimExt.reg, src/vim.def,
84#   src/gvim.exe.mnf.
85# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if
86#   you can make it all work), Cscope and "huge" features.  Exclude workshop
87#   and SNiFF.
88# - With these features: "make proto" (requires cproto and Motif installed;
89#   ignore warnings for missing include files, fix problems for syntax errors).
90# - With these features: "make depend" (works best with gcc).
91# - If you have a lint program: "make lint" and check the output (ignore GTK
92#   warnings).
93# - If you have valgrind, enable it in src/testdir/Makefile and run "make
94#   test".  Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms.
95#   Check the valgrind output.
96# - If you have the efence library, enable it in "src/Makefile" and run "make
97#   test".  Disable Python and Ruby to avoid trouble with threads (efence is
98#   not threadsafe).
99# - Adjust the date and other info in src/version.h.
100# - Correct included_patches[] in src/version.c.
101# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
102# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
103# - Do "make menu" to update the runtime/synmenu.vim file.
104# - Add remarks for changes to runtime/doc/version8.txt.
105# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
106#   ADDITIONS".
107# - In runtime/doc run "make" and "make html" to check for errors.
108# - Check if src/Makefile, src/testdir/Makefile and src/feature.h don't contain
109#   any personal preferences or the changes mentioned above.
110# - Check file protections to be "644" for text and "755" for executables (run
111#   the "check" script).
112# - Check compiling on Amiga, MS-DOS and MS-Windows.
113# - Delete all *~, *.sw?, *.orig, *.rej files
114# - "make unixall", "make html"
115# - Make diff files against the previous release: "makediff7 7.1 7.2"
116#
117# Amiga: (OBSOLETE, Amiga files are no longer distributed)
118# - "make amisrc", move the archive to the Amiga and compile:
119#   "make -f Make_manx.mak" (will use "big" features by default).
120# - Run the tests: "make -f Make_manx.mak test"
121# - Place the executables Vim and Xxd in this directory (set the executable
122#   flag).
123# - "make amirt", "make amibin".
124#
125# MS-Windows:
126# - Run make on Unix to update the ".mo" files.
127# - Get 32 bit libintl-8.dll, libiconv-2.dll and libgcc_s_sjlj-1.dll. E.g. from
128#   https://mlocati.github.io/gettext-iconv-windows/ .
129#   Use the "shared-32.zip file and extract the archive to get the files.
130#   Put them in the gettext32 directory, "make dosrt" uses them.
131# - Get 64 bit libintl-8.dll and libiconv-2.dll. E.g. from
132#   https://mlocati.github.io/gettext-iconv-windows/ .
133#   Use the "shared-64.zip file and extract the archive to get the files.
134#   Put them in the gettext64 directory, "make dosrt" uses them.
135# - > make dossrc
136#   > make dosrt
137#   Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
138#   This creates the directory vim/vim81 and puts all files in there.
139# Win32 console version build:
140# - See src/INSTALLpc.txt for installing the compiler and SDK.
141# - Set environment for Visual C++ 2015:
142#   > cd src
143#   > msvc2015.bat
144# - Build the console binary:
145#   > nmake -f Make_mvc.mak
146# - Run the tests and check the ouput:
147#   > nmake -f Make_mvc.mak testclean
148#   > nmake -f Make_mvc.mak test
149# - Rename (using ../tools/rename.bat):
150#           vim.exe to vimw32.exe
151#           tee/tee.exe to teew32.exe
152#           xxd/xxd.exe to xxdw32.exe
153#           vim.pdb to vimw32.pdb
154#           install.exe to installw32.exe
155#           uninstal.exe to uninstalw32.exe
156# Win32 GUI version build:
157# - > cd src
158#   > nmake -f Make_mvc.mak GUI=yes
159# - Run the tests and check the output:
160#   > nmake -f Make_mvc.mak testclean
161#   > nmake -f Make_mvc.mak testgvim
162# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
163# - Move gvim.pdb to here.
164# - Copy "GvimExt/gvimext.dll" to here.
165# - Delete vimrun.exe, install.exe and uninstal.exe.
166# Win32 GUI version with OLE, PERL, Ruby, TCL, PYTHON and dynamic IME:
167# - Install the interfaces you want, see src/INSTALLpc.txt
168#   Adjust bigvim.bat to match the version of each interface you want.
169# - Build:
170#   > cd src
171#   > bigvim.bat
172# - Run the tests:
173#   > nmake -f Make_mvc.mak testclean
174#   > nmake -f Make_mvc.mak testgvim
175#   - check the output.
176# - Rename "gvim.exe" to "gvim_ole.exe".
177# - Rename gvim.pdb to "gvim_ole.pdb".
178# - Delete install.exe and uninstal.exe.
179# Create the archives:
180# - Copy all the "*.exe" files to where this Makefile is.
181# - Copy all the "*.pdb" files to where this Makefile is.
182# - in this directory:
183#   > make dosbin
184# NSIS self installing exe:
185# - To get NSIS see http://nsis.sourceforge.net
186# - Make sure gvim_ole.exe, vimw32.exe, installw32.exe,
187#   uninstalw32.exe, teew32.exe and xxdw32.exe have been build as mentioned
188#   above.
189# - copy these files (get them from a binary archive or build them):
190#	gvimext.dll in src/GvimExt
191#	gvimext64.dll in src/GvimExt
192#	VisVim.dll in src/VisVim
193#   Note: VisVim needs to be build with MSVC 5, newer versions don't work.
194#   gvimext64.dll can be obtained from:
195#   https://github.com/vim/vim-win32-installer/releases
196#	It is part of gvim_8.0.*_x64.zip as vim/vim80/GvimExt/gvimext64.dll.
197# - Make sure there is a diff.exe two levels up (get it from a previous Vim
198#   version).  Also put winpty32.dll and winpty-agent.exe there.
199# - go to ../nsis and do:
200#   > makensis gvim.nsi  (takes a few minutes).
201#      ignore warning for libwinpthread-1.dll
202# - Copy gvim##.exe to the dist directory.
203#
204# 64 bit builds (these are not in the normal distribution, the 32 bit build
205# works just fine on 64 bit systems).
206# Like the console and GUI version, but first run vcvars64.bat or
207#   "..\VC\vcvarsall.bat x86_amd64".
208# - Build the console version:
209#   > nmake -f Make_mvc.mak
210# - Build the GUI version:
211#   > nmake -f Make_mvc.mak GUI=yes
212# - Build the OLE version with interfaces:
213#   > bigvim64.bat
214#
215#
216# OBSOLETE systems: You can build these if you have an appropriate system.
217#
218# 16 bit DOS version: You need to get a very old version of Vim, for several
219# years even the tiny build is too big to fit in DOS memory.
220#
221# 32 bit DOS version: Support was removed in 7.4.1399.  When syncing to before
222# that it probably won't build.
223#
224# Win32s GUI version: Support was removed in patch 7.4.1364.
225#
226# OS/2 support was removed in patch 7.4.1008.  If you want to give it a try
227# sync to before that and check the old version of this Makefile for
228# instructions.
229
230VIMVER	= vim-$(MAJOR).$(MINOR)
231VERSION = $(MAJOR)$(MINOR)
232VDOT	= $(MAJOR).$(MINOR)
233VIMRTDIR = vim$(VERSION)
234
235# Vim used for conversion from "unix" to "dos"
236VIM	= vim
237
238# How to include Filelist depends on the version of "make" you have.
239# If the current choice doesn't work, try the other one.
240
241include Filelist
242#.include "Filelist"
243
244
245# All output is put in the "dist" directory.
246dist:
247	mkdir dist
248
249# Clean up some files to avoid they are included.
250# Copy README files to the top directory.
251prepare:
252	if test -f runtime/doc/uganda.nsis.txt; then \
253		rm runtime/doc/uganda.nsis.txt; fi
254	for name in $(IN_README_DIR); do \
255	  cp READMEdir/"$$name" .; \
256	  done
257
258# For the zip files we need to create a file with the comment line
259dist/comment:
260	mkdir dist/comment
261
262COMMENT_RT = comment/$(VERSION)-rt
263COMMENT_W32 = comment/$(VERSION)-bin-w32
264COMMENT_GVIM = comment/$(VERSION)-bin-gvim
265COMMENT_OLE = comment/$(VERSION)-bin-ole
266COMMENT_SRC = comment/$(VERSION)-src
267COMMENT_HTML = comment/$(VERSION)-html
268COMMENT_FARSI = comment/$(VERSION)-farsi
269
270dist/$(COMMENT_RT): dist/comment
271	echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
272
273dist/$(COMMENT_W32): dist/comment
274	echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
275
276dist/$(COMMENT_GVIM): dist/comment
277	echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
278
279dist/$(COMMENT_OLE): dist/comment
280	echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
281
282dist/$(COMMENT_SRC): dist/comment
283	echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
284
285dist/$(COMMENT_HTML): dist/comment
286	echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
287
288dist/$(COMMENT_FARSI): dist/comment
289	echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
290
291unixall: dist prepare
292	-rm -f dist/$(VIMVER).tar.bz2
293	-rm -rf dist/$(VIMRTDIR)
294	mkdir dist/$(VIMRTDIR)
295	tar cf - \
296		$(RT_ALL) \
297		$(RT_ALL_BIN) \
298		$(RT_UNIX) \
299		$(RT_UNIX_DOS_BIN) \
300		$(RT_SCRIPTS) \
301		$(LANG_GEN) \
302		$(LANG_GEN_BIN) \
303		$(SRC_ALL) \
304		$(SRC_UNIX) \
305		$(SRC_DOS_UNIX) \
306		$(EXTRA) \
307		$(LANG_SRC) \
308		| (cd dist/$(VIMRTDIR); tar xf -)
309	-rm $(IN_README_DIR)
310# Need to use a "distclean" config.mk file
311# Note: this file is not included in the repository to avoid problems, but it's
312# OK to put it in the archive.
313	cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
314# Create an empty config.h file, make dependencies require it
315	touch dist/$(VIMRTDIR)/src/auto/config.h
316# Make sure configure is newer than config.mk to force it to be generated
317	touch dist/$(VIMRTDIR)/src/configure
318# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
319# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
320	touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
321	touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
322	touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
323	touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
324	touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
325	touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
326	touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
327# Create the archive.
328	cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
329	bzip2 dist/$(VIMVER).tar
330
331# Amiga runtime - OBSOLETE
332amirt: dist prepare
333	-rm -f dist/vim$(VERSION)rt.tar.gz
334	-rm -rf dist/Vim
335	mkdir dist/Vim
336	mkdir dist/Vim/$(VIMRTDIR)
337	tar cf - \
338		$(ROOT_AMI) \
339		$(RT_ALL) \
340		$(RT_ALL_BIN) \
341		$(RT_SCRIPTS) \
342		$(RT_AMI) \
343		$(RT_NO_UNIX) \
344		$(RT_AMI_DOS) \
345		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
346	-rm $(IN_README_DIR)
347	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
348	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
349	mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
350	rmdir dist/Vim/$(VIMRTDIR)/runtime
351	cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
352	gzip -9 dist/vim$(VERSION)rt.tar
353	mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
354
355# Amiga binaries - OBSOLETE
356amibin: dist prepare
357	-rm -f dist/vim$(VERSION)bin.tar.gz
358	-rm -rf dist/Vim
359	mkdir dist/Vim
360	mkdir dist/Vim/$(VIMRTDIR)
361	tar cf - \
362		$(ROOT_AMI) \
363		$(BIN_AMI) \
364		Vim \
365		Xxd \
366		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
367	-rm $(IN_README_DIR)
368	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
369	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
370	cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
371	gzip -9 dist/vim$(VERSION)bin.tar
372	mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
373
374# Amiga sources - OBSOLETE
375amisrc: dist prepare
376	-rm -f dist/vim$(VERSION)src.tar.gz
377	-rm -rf dist/Vim
378	mkdir dist/Vim
379	mkdir dist/Vim/$(VIMRTDIR)
380	tar cf - \
381		$(ROOT_AMI) \
382		$(SRC_ALL) \
383		$(SRC_AMI) \
384		$(SRC_AMI_DOS) \
385		| (cd dist/Vim/$(VIMRTDIR); tar xf -)
386	-rm $(IN_README_DIR)
387	mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
388	mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
389	cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
390	gzip -9 dist/vim$(VERSION)src.tar
391	mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
392
393no_title.vim: Makefile
394	echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
395
396# MS-DOS sources
397dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
398	runtime/doc/uganda.nsis.txt \
399	nsis/gvim_version.nsh
400	-rm -rf dist/vim$(VERSION)src.zip
401	-rm -rf dist/vim
402	mkdir dist/vim
403	mkdir dist/vim/$(VIMRTDIR)
404	tar cf - \
405		$(SRC_ALL) \
406		$(SRC_DOS) \
407		$(SRC_AMI_DOS) \
408		$(SRC_DOS_UNIX) \
409		runtime/doc/uganda.nsis.txt \
410		nsis/gvim_version.nsh \
411		| (cd dist/vim/$(VIMRTDIR); tar xf -)
412	mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
413	rmdir dist/vim/$(VIMRTDIR)/runtime
414	# This file needs to be in dos fileformat for NSIS.
415	$(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt
416	tar cf - \
417		$(SRC_DOS_BIN) \
418		| (cd dist/vim/$(VIMRTDIR); tar xf -)
419	cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
420
421runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
422	cd runtime/doc && $(MAKE) uganda.nsis.txt
423
424nsis/gvim_version.nsh: Makefile
425	echo "# Generated from Makefile: define the version numbers" > $@
426	echo "!ifndef __GVIM_VER__NSH__"  >> $@
427	echo "!define __GVIM_VER__NSH__"  >> $@
428	echo "!define VER_MAJOR $(MAJOR)" >> $@
429	echo "!define VER_MINOR $(MINOR)" >> $@
430	echo "!endif" >> $@
431
432dosrt: dist dist/$(COMMENT_RT) dosrt_files
433	-rm -rf dist/vim$(VERSION)rt.zip
434	cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
435
436# Split in two parts to avoid an "argument list too long" error.
437# We no longer convert the files from unix to dos fileformat.
438dosrt_files: dist prepare no_title.vim
439	-rm -rf dist/vim
440	mkdir dist/vim
441	mkdir dist/vim/$(VIMRTDIR)
442	mkdir dist/vim/$(VIMRTDIR)/lang
443	cd src && MAKEMO=yes $(MAKE) languages
444	tar cf - \
445		$(RT_ALL) \
446		| (cd dist/vim/$(VIMRTDIR); tar xf -)
447	tar cf - \
448		$(RT_SCRIPTS) \
449		$(RT_DOS) \
450		$(RT_NO_UNIX) \
451		$(RT_AMI_DOS) \
452		$(LANG_GEN) \
453		| (cd dist/vim/$(VIMRTDIR); tar xf -)
454	tar cf - \
455		$(RT_UNIX_DOS_BIN) \
456		$(RT_ALL_BIN) \
457		$(RT_DOS_BIN) \
458		$(LANG_GEN_BIN) \
459		| (cd dist/vim/$(VIMRTDIR); tar xf -)
460	-rm $(IN_README_DIR)
461	mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
462	rmdir dist/vim/$(VIMRTDIR)/runtime
463# Add the message translations.  Trick: skip ja.mo and use ja.sjis.mo instead.
464# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
465# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
466	for i in $(LANG_DOS); do \
467	      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 \
468		n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
469		mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
470		mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
471		cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
472	      fi \
473	    done
474	mkdir dist/vim/$(VIMRTDIR)/gettext32
475	cp gettext32/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext32/
476	cp gettext32/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext32/
477	cp gettext32/libgcc_s_sjlj-1.dll dist/vim/$(VIMRTDIR)/gettext32/
478	mkdir dist/vim/$(VIMRTDIR)/gettext64
479	cp gettext64/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext64/
480	cp gettext64/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext64/
481
482
483# Used before uploading.  Don't delete the AAPDIR/sign files!
484runtime_unix2dos: dosrt_files
485	-rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
486	cd dist/vim/$(VIMRTDIR); tar cf - * \
487		| (cd ../../../runtime/dos; tar xf -)
488
489dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S)
490	-rm $(IN_README_DIR)
491
492# make Win32 gvim
493dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
494	-rm -rf dist/gvim$(VERSION).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	cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
502	cp teew32.exe dist/vim/$(VIMRTDIR)/tee.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	mkdir dist/vim/$(VIMRTDIR)/GvimExt32
508	cp gvimext.dll dist/vim/$(VIMRTDIR)/GvimExt32/gvimext.dll
509	mkdir dist/vim/$(VIMRTDIR)/GvimExt64
510	cp gvimext64.dll dist/vim/$(VIMRTDIR)/GvimExt64/gvimext.dll
511	cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
512	cp gvim.pdb dist/gvim$(VERSION).pdb
513
514# make Win32 console
515dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
516	-rm -rf dist/vim$(VERSION)w32.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	cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
524	cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
525	cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
526	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
527	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
528	cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
529	cp vimw32.pdb dist/vim$(VERSION)w32.pdb
530
531# make Win32 gvim with OLE
532dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
533	-rm -rf dist/gvim$(VERSION)ole.zip
534	-rm -rf dist/vim
535	mkdir dist/vim
536	mkdir dist/vim/$(VIMRTDIR)
537	tar cf - \
538		$(BIN_DOS) \
539		| (cd dist/vim/$(VIMRTDIR); tar xf -)
540	cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
541	cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
542	cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
543	cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
544	cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
545	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
546	cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
547	cp README_ole.txt dist/vim/$(VIMRTDIR)
548	cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
549	cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
550	cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
551	cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
552
553html: dist dist/$(COMMENT_HTML)
554	-rm -rf dist/vim$(VERSION)html.zip
555	cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
556
557farsi: dist dist/$(COMMENT_FARSI)
558	-rm -f dist/farsi$(VERSION).zip
559	zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)
560