blob: 8ac9cc79bf921e2d6b44634783af5e55336086b3 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000040#
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!
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +000067# To do all this you need the unix, extra and lang archives, and
Bram Moolenaar071d4272004-06-13 20:20:40 +000068# compiled binaries.
69# Before creating an archive first delete all backup files, *.orig, etc.
70
Bram Moolenaara5792f52005-11-23 21:25:05 +000071MAJOR = 7
Bram Moolenaar3991dab2006-03-27 17:01:56 +000072MINOR = 0c
Bram Moolenaar071d4272004-06-13 20:20:40 +000073
74# Uncomment this line if the Win32s version is to be included.
Bram Moolenaarc01140a2006-03-24 22:21:52 +000075DOSBIN_S = dosbin_s
Bram Moolenaar071d4272004-06-13 20:20:40 +000076
77# CHECKLIST for creating a new version:
78#
79# - Update Vim version number. For a test version in: src/version.h, Contents,
Bram Moolenaarc01140a2006-03-24 22:21:52 +000080# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
Bram Moolenaarc6039d82005-12-02 00:44:04 +000081# 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.
Bram Moolenaar071d4272004-06-13 20:20:40 +000083# - Correct included_patches[] in src/version.c.
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +000084# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge"
85# features. Exclude workshop and SNiFF.
Bram Moolenaar071d4272004-06-13 20:20:40 +000086# - 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.
Bram Moolenaarc01140a2006-03-24 22:21:52 +000095# - Add remarks for changes to runtime/doc/version7.txt.
Bram Moolenaar071d4272004-06-13 20:20:40 +000096# - 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".
Bram Moolenaarc6039d82005-12-02 00:44:04 +0000127# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
129# "uninstald32.exe".
130# Win32 console version:
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000131# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132# - "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".
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000135# - Rename ObjC/vim.pdb to vimw32.pdb.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136# - 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).
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000142# - Move ObjG/gvim.pdb to here.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000143# - 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".
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000148# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000149# - 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)
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000171# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172# - make sure there is a diff.exe two levels up
173# - go to ../nsis and do "makensis gvim.nsi".
174# - Copy gvim##.exe to the dist directory.
175#
176# OS/2:
177# - Unpack the Unix "src", "extra" and "rt" archives.
178# - "make -f Make_os2.mak".
179# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
180# them to here.
181# - "make os2bin".
182
183VIMVER = vim-$(MAJOR).$(MINOR)
184VERSION = $(MAJOR)$(MINOR)
185VDOT = $(MAJOR).$(MINOR)
186VIMRTDIR = vim$(VERSION)
187
188# Vim used for conversion from "unix" to "dos"
189VIM = vim
190
191# How to include Filelist depends on the version of "make" you have.
192# If the current choice doesn't work, try the other one.
193
194include Filelist
195#.include "Filelist"
196
197
198# All output is put in the "dist" directory.
199dist:
200 mkdir dist
201
202# Clean up some files to avoid they are included.
203prepare:
204 if test -f runtime/doc/uganda.nsis.txt; then \
205 rm runtime/doc/uganda.nsis.txt; fi
206
207# For the zip files we need to create a file with the comment line
208dist/comment:
209 mkdir dist/comment
210
211COMMENT_RT = comment/$(VERSION)-rt
212COMMENT_RT1 = comment/$(VERSION)-rt1
213COMMENT_RT2 = comment/$(VERSION)-rt2
214COMMENT_D16 = comment/$(VERSION)-bin-d16
215COMMENT_D32 = comment/$(VERSION)-bin-d32
216COMMENT_W32 = comment/$(VERSION)-bin-w32
217COMMENT_GVIM = comment/$(VERSION)-bin-gvim
218COMMENT_OLE = comment/$(VERSION)-bin-ole
219COMMENT_W32S = comment/$(VERSION)-bin-w32s
220COMMENT_SRC = comment/$(VERSION)-src
221COMMENT_OS2 = comment/$(VERSION)-bin-os2
222COMMENT_HTML = comment/$(VERSION)-html
223COMMENT_FARSI = comment/$(VERSION)-farsi
224COMMENT_LANG = comment/$(VERSION)-lang
225
226dist/$(COMMENT_RT): dist/comment
227 echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
228
229dist/$(COMMENT_RT1): dist/comment
230 echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 1) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT1)
231
232dist/$(COMMENT_RT2): dist/comment
233 echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 2) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT2)
234
235dist/$(COMMENT_D16): dist/comment
236 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
237
238dist/$(COMMENT_D32): dist/comment
239 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 32 bit protected mode" > dist/$(COMMENT_D32)
240
241dist/$(COMMENT_W32): dist/comment
242 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
243
244dist/$(COMMENT_GVIM): dist/comment
245 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
246
247dist/$(COMMENT_OLE): dist/comment
248 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
249
250dist/$(COMMENT_W32S): dist/comment
251 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows 3.1/3.11" > dist/$(COMMENT_W32S)
252
253dist/$(COMMENT_SRC): dist/comment
254 echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
255
256dist/$(COMMENT_OS2): dist/comment
257 echo "Vim - Vi IMproved - v$(VDOT) binaries + runtime files for OS/2" > dist/$(COMMENT_OS2)
258
259dist/$(COMMENT_HTML): dist/comment
260 echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
261
262dist/$(COMMENT_FARSI): dist/comment
263 echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
264
265dist/$(COMMENT_LANG): dist/comment
266 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
267
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000268unixall: dist prepare
269 -rm -f dist/$(VIMVER).tar.bz2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270 -rm -rf dist/$(VIMRTDIR)
271 mkdir dist/$(VIMRTDIR)
272 tar cf - \
273 $(RT_ALL) \
274 $(RT_ALL_BIN) \
275 $(RT_UNIX) \
276 $(RT_UNIX_DOS_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277 $(RT_SCRIPTS) \
278 $(LANG_GEN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000279 $(LANG_GEN_BIN) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000280 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281 $(SRC_UNIX) \
282 $(SRC_DOS_UNIX) \
283 | (cd dist/$(VIMRTDIR); tar xf -)
284# Need to use a "distclean" config.mk file
285 cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
286# Create an empty config.h file, make dependencies require it
287 touch dist/$(VIMRTDIR)/src/auto/config.h
288# Make sure configure is newer than config.mk to force it to be generated
289 touch dist/$(VIMRTDIR)/src/configure
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290 cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
291 bzip2 dist/$(VIMVER).tar
292
293extra: dist prepare
294 -rm -f dist/$(VIMVER)-extra.tar.gz
295 -rm -rf dist/$(VIMRTDIR)
296 mkdir dist/$(VIMRTDIR)
297 tar cf - \
298 $(EXTRA) \
299 | (cd dist/$(VIMRTDIR); tar xf -)
300 cd dist && tar cf $(VIMVER)-extra.tar $(VIMRTDIR)
301 gzip -9 dist/$(VIMVER)-extra.tar
302
303lang: dist prepare
304 -rm -f dist/$(VIMVER)-lang.tar.gz
305 -rm -rf dist/$(VIMRTDIR)
306 mkdir dist/$(VIMRTDIR)
307 tar cf - \
308 $(LANG_SRC) \
309 | (cd dist/$(VIMRTDIR); tar xf -)
310# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
311# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
312 touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
313 touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
314 touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
315 touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
316 touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
317 touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000318 touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319 cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
320 gzip -9 dist/$(VIMVER)-lang.tar
321
322amirt: dist prepare
323 -rm -f dist/vim$(VERSION)rt.tar.gz
324 -rm -rf dist/Vim
325 mkdir dist/Vim
326 mkdir dist/Vim/$(VIMRTDIR)
327 tar cf - \
328 $(ROOT_AMI) \
329 $(RT_ALL) \
330 $(RT_ALL_BIN) \
331 $(RT_SCRIPTS) \
332 $(RT_AMI) \
333 $(RT_NO_UNIX) \
334 $(RT_AMI_DOS) \
335 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
336 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
337 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
338 mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
339 rmdir dist/Vim/$(VIMRTDIR)/runtime
340 cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
341 gzip -9 dist/vim$(VERSION)rt.tar
342 mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
343
344amibin: dist prepare
345 -rm -f dist/vim$(VERSION)bin.tar.gz
346 -rm -rf dist/Vim
347 mkdir dist/Vim
348 mkdir dist/Vim/$(VIMRTDIR)
349 tar cf - \
350 $(ROOT_AMI) \
351 $(BIN_AMI) \
352 Vim \
353 Xxd \
354 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
355 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
356 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
357 cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
358 gzip -9 dist/vim$(VERSION)bin.tar
359 mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
360
361amisrc: dist prepare
362 -rm -f dist/vim$(VERSION)src.tar.gz
363 -rm -rf dist/Vim
364 mkdir dist/Vim
365 mkdir dist/Vim/$(VIMRTDIR)
366 tar cf - \
367 $(ROOT_AMI) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000368 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000369 $(SRC_AMI) \
370 $(SRC_AMI_DOS) \
371 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
372 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
373 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
374 cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
375 gzip -9 dist/vim$(VERSION)src.tar
376 mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
377
378no_title.vim: Makefile
379 echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
380
381dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
382 -rm -rf dist/vim$(VERSION)rt.zip
383 cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
384
Bram Moolenaara5792f52005-11-23 21:25:05 +0000385# Split in two parts to avoid a "argument list too long" error.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000386dosrt_unix2dos: dist prepare no_title.vim
387 -rm -rf dist/vim
388 mkdir dist/vim
389 mkdir dist/vim/$(VIMRTDIR)
390 tar cf - \
391 $(RT_ALL) \
Bram Moolenaara5792f52005-11-23 21:25:05 +0000392 | (cd dist/vim/$(VIMRTDIR); tar xf -)
393 tar cf - \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000394 $(RT_SCRIPTS) \
395 $(RT_DOS) \
396 $(RT_NO_UNIX) \
397 $(RT_AMI_DOS) \
398 $(LANG_GEN) \
399 | (cd dist/vim/$(VIMRTDIR); tar xf -)
400 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
401 tar cf - \
402 $(RT_UNIX_DOS_BIN) \
403 $(RT_ALL_BIN) \
404 $(RT_DOS_BIN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000405 $(LANG_GEN_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000406 | (cd dist/vim/$(VIMRTDIR); tar xf -)
407 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
408 rmdir dist/vim/$(VIMRTDIR)/runtime
409
410
411# Convert runtime files from Unix fileformat to dos fileformat.
412# Used before uploading. Don't delete the AAPDIR/sign files!
413runtime_unix2dos: dosrt_unix2dos
414 -rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
415 cd dist/vim/$(VIMRTDIR); tar cf - * \
416 | (cd ../../../runtime/dos; tar xf -)
417
418dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_d16 dosbin_ole $(DOSBIN_S)
419
420# make Win32 gvim
421dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
422 -rm -rf dist/gvim$(VERSION).zip
423 -rm -rf dist/vim
424 mkdir dist/vim
425 mkdir dist/vim/$(VIMRTDIR)
426 tar cf - \
427 $(BIN_DOS) \
428 | (cd dist/vim/$(VIMRTDIR); tar xf -)
429 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
430 cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
431 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
432 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
433 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
434 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
435 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
436 cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000437 cp gvim.pdb dist/gvim$(VERSION).pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438
439# make Win32 console
440dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
441 -rm -rf dist/vim$(VERSION)w32.zip
442 -rm -rf dist/vim
443 mkdir dist/vim
444 mkdir dist/vim/$(VIMRTDIR)
445 tar cf - \
446 $(BIN_DOS) \
447 | (cd dist/vim/$(VIMRTDIR); tar xf -)
448 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
449 cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
450 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
451 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
452 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
453 cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000454 cp vimw32.pdb dist/vim$(VERSION)w32.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000455
456# make 32bit DOS
457dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
458 -rm -rf dist/vim$(VERSION)d32.zip
459 -rm -rf dist/vim
460 mkdir dist/vim
461 mkdir dist/vim/$(VIMRTDIR)
462 tar cf - \
463 $(BIN_DOS) \
464 | (cd dist/vim/$(VIMRTDIR); tar xf -)
465 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
466 cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
467 cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
468 cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
469 cp uninstald32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
470 cp csdpmi4b.zip dist/vim/$(VIMRTDIR)
471 cd dist && zip -9 -rD -z vim$(VERSION)d32.zip vim <$(COMMENT_D32)
472
473# make 16bit DOS
474dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
475 -rm -rf dist/vim$(VERSION)d16.zip
476 -rm -rf dist/vim
477 mkdir dist/vim
478 mkdir dist/vim/$(VIMRTDIR)
479 tar cf - \
480 $(BIN_DOS) \
481 | (cd dist/vim/$(VIMRTDIR); tar xf -)
482 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
483 cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
484 cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
485 cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
486 cp uninstald16.exe dist/vim/$(VIMRTDIR)/uninstal.exe
487 cd dist && zip -9 -rD -z vim$(VERSION)d16.zip vim <$(COMMENT_D16)
488
489# make Win32 gvim with OLE
490dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
491 -rm -rf dist/gvim$(VERSION)ole.zip
492 -rm -rf dist/vim
493 mkdir dist/vim
494 mkdir dist/vim/$(VIMRTDIR)
495 tar cf - \
496 $(BIN_DOS) \
497 | (cd dist/vim/$(VIMRTDIR); tar xf -)
498 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
499 cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
500 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
501 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
502 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
503 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
504 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
505 cp README_ole.txt dist/vim/$(VIMRTDIR)
506 cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
507 cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
508 cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000509 cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000510
511# make Win32s gvim
512dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
513 -rm -rf dist/gvim$(VERSION)_s.zip
514 -rm -rf dist/vim
515 mkdir dist/vim
516 mkdir dist/vim/$(VIMRTDIR)
517 tar cf - \
518 $(BIN_DOS) \
519 | (cd dist/vim/$(VIMRTDIR); tar xf -)
520 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
521 cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
522 cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
523 cp README_w32s.txt dist/vim/$(VIMRTDIR)
524 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
525 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
526 cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
527
528# make Win32 lang archive
529doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
530 -rm -rf dist/vim$(VERSION)lang.zip
531 -rm -rf dist/vim
532 mkdir dist/vim
533 mkdir dist/vim/$(VIMRTDIR)
534 mkdir dist/vim/$(VIMRTDIR)/lang
535 cd src && MAKEMO=yes $(MAKE) languages
536 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
537# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
538# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000539# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540 for i in $(LANG_DOS); do \
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000541 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 \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542 n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
543 mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
544 mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
545 cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
546 fi \
547 done
548 cp libintl.dll dist/vim/$(VIMRTDIR)/
549 cd dist && zip -9 -rD -z vim$(VERSION)lang.zip vim <$(COMMENT_LANG)
550
551# MS-DOS sources
552dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
553 -rm -rf dist/vim$(VERSION)src.zip
554 -rm -rf dist/vim
555 mkdir dist/vim
556 mkdir dist/vim/$(VIMRTDIR)
557 tar cf - \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000558 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000559 $(SRC_DOS) \
560 $(SRC_AMI_DOS) \
561 $(SRC_DOS_UNIX) \
562 runtime/doc/uganda.nsis.txt \
563 | (cd dist/vim/$(VIMRTDIR); tar xf -)
564 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
565 rmdir dist/vim/$(VIMRTDIR)/runtime
566 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
567 tar cf - \
568 $(SRC_DOS_BIN) \
569 | (cd dist/vim/$(VIMRTDIR); tar xf -)
570 cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
571
572runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
573 cd runtime/doc && $(MAKE) uganda.nsis.txt
574
575os2bin: dist no_title.vim dist/$(COMMENT_OS2)
576 -rm -rf dist/vim$(VERSION)os2.zip
577 -rm -rf dist/vim
578 mkdir dist/vim
579 mkdir dist/vim/$(VIMRTDIR)
580 tar cf - \
581 $(BIN_OS2) \
582 | (cd dist/vim/$(VIMRTDIR); tar xf -)
583 find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
584 cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
585 cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
586 cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
587 cp emx.dll emxlibcs.dll dist/vim/$(VIMRTDIR)
588 cd dist && zip -9 -rD -z vim$(VERSION)os2.zip vim <$(COMMENT_OS2)
589
590html: dist dist/$(COMMENT_HTML)
591 -rm -rf dist/vim$(VERSION)html.zip
592 cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
593
594farsi: dist dist/$(COMMENT_FARSI)
595 -rm -f dist/farsi$(VERSION).zip
596 zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)