blob: 962d6d4751088d17625d993a6a166f22b4eb6f53 [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
Bram Moolenaar864665d2010-05-15 15:41:59 +02006#########################################################################
7# 1. Starting the compilation of Vim for Unix.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008#
Bram Moolenaar864665d2010-05-15 15:41:59 +02009# Using this Makefile without an argument will compile Vim for Unix.
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# "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:
Bram Moolenaar542512a2011-02-15 15:28:09 +010026 @if test ! -f src/auto/config.mk; then \
27 cp src/config.mk.dist src/auto/config.mk; \
28 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000029 @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.
Bram Moolenaare21d6242016-07-16 20:43:14 +020035all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean:
Bram Moolenaar542512a2011-02-15 15:28:09 +010036 @if test ! -f src/auto/config.mk; then \
37 cp src/config.mk.dist src/auto/config.mk; \
38 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 @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
43
Bram Moolenaar864665d2010-05-15 15:41:59 +020044#########################################################################
45# 2. Creating the various distribution files.
Bram Moolenaar071d4272004-06-13 20:20:40 +000046#
47# TARGET PRODUCES CONTAINS
Bram Moolenaar864665d2010-05-15 15:41:59 +020048# unixall vim-#.#.tar.bz2 All runtime files and sources, for Unix
Bram Moolenaar071d4272004-06-13 20:20:40 +000049#
50# html vim##html.zip HTML docs
51#
Bram Moolenaar071d4272004-06-13 20:20:40 +000052# dossrc vim##src.zip sources for MS-DOS
53# dosrt vim##rt.zip runtime for MS-DOS
Bram Moolenaarfec246d2016-08-28 18:47:14 +020054# dosbin vim##w32.zip binary for Win32
Bram Moolenaar071d4272004-06-13 20:20:40 +000055# gvim##.zip binary for GUI Win32
56# gvim##ole.zip OLE exe for Win32 GUI
Bram Moolenaar864665d2010-05-15 15:41:59 +020057#
58# OBSOLETE
59# amisrc vim##src.tgz sources for Amiga
60# amirt vim##rt.tgz runtime for Amiga
61# amibin vim##bin.tgz binary for Amiga
Bram Moolenaar071d4272004-06-13 20:20:40 +000062#
Bram Moolenaar071d4272004-06-13 20:20:40 +000063# farsi farsi##.zip Farsi fonts
64#
65# All output files are created in the "dist" directory. Existing files are
66# overwritten!
Bram Moolenaar864665d2010-05-15 15:41:59 +020067# To do all this you need the Unix archive and compiled binaries.
Bram Moolenaar071d4272004-06-13 20:20:40 +000068# Before creating an archive first delete all backup files, *.orig, etc.
69
Bram Moolenaara5792f52005-11-23 21:25:05 +000070MAJOR = 7
Bram Moolenaar3b1db362013-08-10 15:00:24 +020071MINOR = 4
Bram Moolenaar071d4272004-06-13 20:20:40 +000072
Bram Moolenaar071d4272004-06-13 20:20:40 +000073# CHECKLIST for creating a new version:
74#
75# - Update Vim version number. For a test version in: src/version.h, Contents,
Bram Moolenaarc01140a2006-03-24 22:21:52 +000076# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +010077# runtime/doc/*.txt and nsis/gvim.nsi.
78# For a minor/major version: src/GvimExt/GvimExt.reg, src/vim.def,
79# src/vim16.def, src/gvim.exe.mnf.
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +020080# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if
Bram Moolenaarbfc8b972010-08-13 22:05:54 +020081# you can make it all work), Cscope and "huge" features. Exclude workshop
82# and SNiFF.
Bram Moolenaar071d4272004-06-13 20:20:40 +000083# - With these features: "make proto" (requires cproto and Motif installed;
84# ignore warnings for missing include files, fix problems for syntax errors).
85# - With these features: "make depend" (works best with gcc).
Bram Moolenaar6df6f472010-07-18 18:04:50 +020086# - If you have a lint program: "make lint" and check the output (ignore GTK
87# warnings).
Bram Moolenaar3b1db362013-08-10 15:00:24 +020088# - If you have valgrind, enable it in src/testdir/Makefile and run "make
89# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms.
90# Check the valgrind output.
91# - If you have the efence library, enable it in "src/Makefile" and run "make
92# test". Disable Python and Ruby to avoid trouble with threads (efence is
93# not threadsafe).
94# - Adjust the date and other info in src/version.h.
95# - Correct included_patches[] in src/version.c.
Bram Moolenaar071d4272004-06-13 20:20:40 +000096# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
97# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
98# - Do "make menu" to update the runtime/synmenu.vim file.
Bram Moolenaarc01140a2006-03-24 22:21:52 +000099# - Add remarks for changes to runtime/doc/version7.txt.
Bram Moolenaar5cdd0df2007-05-12 12:58:05 +0000100# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
101# ADDITIONS".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102# - In runtime/doc run "make" and "make html" to check for errors.
Bram Moolenaar3b1db362013-08-10 15:00:24 +0200103# - Check if src/Makefile, src/testdir/Makefile and src/feature.h don't contain
104# any personal preferences or the changes mentioned above.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105# - Check file protections to be "644" for text and "755" for executables (run
106# the "check" script).
107# - Check compiling on Amiga, MS-DOS and MS-Windows.
108# - Delete all *~, *.sw?, *.orig, *.rej files
Bram Moolenaar864665d2010-05-15 15:41:59 +0200109# - "make unixall", "make html"
Bram Moolenaar5cdd0df2007-05-12 12:58:05 +0000110# - Make diff files against the previous release: "makediff7 7.1 7.2"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111#
Bram Moolenaarfff2bee2010-05-15 13:56:02 +0200112# Amiga: (OBSOLETE, Amiga files are no longer distributed)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000113# - "make amisrc", move the archive to the Amiga and compile:
114# "make -f Make_manx.mak" (will use "big" features by default).
115# - Run the tests: "make -f Make_manx.mak test"
116# - Place the executables Vim and Xxd in this directory (set the executable
117# flag).
118# - "make amirt", "make amibin".
119#
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100120# MS-Windows:
Bram Moolenaar442b4222010-05-24 21:34:22 +0200121# - Run make on Unix to update the ".mo" files.
Bram Moolenaar286eacd2016-01-16 18:05:50 +0100122# - Get libintl-8.dll and libiconv-2.dll. E.g. from
123# https://mlocati.github.io/gettext-iconv-windows/ .
124# Put them in the top directory, "make dosrt" uses them.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100125# - > make dossrc
126# > make dosrt
127# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
128# Win32 console version build:
129# - Set environment for Visual C++ 2008, e.g.:
130# > src/msvc2008.bat
131# Or:
132# > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
Bram Moolenaarba460752013-07-04 22:35:01 +0200133# Or, when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
134# paths when necessary).
135# For Windows 98/ME the 2003 version is required, but then the executable
Bram Moolenaar1a42b4b2013-07-28 18:29:08 +0200136# won't work on Windows 7 and 64 bit systems.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100137# - > cd src
138# > nmake -f Make_mvc.mak
Bram Moolenaare292d802015-12-29 19:03:21 +0100139# - Run the tests:
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100140# > rm testdir/*.out testdir/*.res
Bram Moolenaare292d802015-12-29 19:03:21 +0100141# > nmake -f Make_mvc.mak test
142# - check the output.
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200143# - Rename: vim.exe to vimw32.exe,
144# tee/tee.exe to teew32.exe,
145# xxd/xxd.exe to xxdw32.exe
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000146# - Rename vim.pdb to vimw32.pdb.
Bram Moolenaarba460752013-07-04 22:35:01 +0200147# - Rename install.exe to installw32.exe and uninstal.exe to uninstalw32.exe.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100148# Win32 GUI version build:
149# - > cd src
150# > nmake -f Make_mvc.mak GUI=yes
Bram Moolenaare292d802015-12-29 19:03:21 +0100151# - Run the tests:
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100152# > rm testdir/*.out testdir/*.res
153# > nmake -f Make_mvc.mak testgvim
Bram Moolenaare292d802015-12-29 19:03:21 +0100154# - check the output.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000155# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000156# - Move gvim.pdb to here.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000157# - Copy "GvimExt/gvimext.dll" to here.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100158# - Delete vimrun.exe, install.exe and uninstal.exe.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100160# - Install the interfaces you want, see src/INSTALLpc.txt
161# - Build:
162# > cd src
163# Adjust bigvim.bat to match the version of each interface you want.
164# > bigvim.bat
Bram Moolenaare292d802015-12-29 19:03:21 +0100165# - Run the tests:
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100166# > rm testdir/*.out testdir/*.res
167# > nmake -f Make_mvc.mak testgvim
Bram Moolenaare292d802015-12-29 19:03:21 +0100168# - check the output.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169# - Rename "gvim.exe" to "gvim_ole.exe".
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000170# - Rename gvim.pdb to "gvim_ole.pdb".
Bram Moolenaar143c38c2007-05-10 16:41:10 +0000171# - Delete install.exe and uninstal.exe.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172# Create the archives:
173# - Copy all the "*.exe" files to where this Makefile is.
Bram Moolenaarb21e5842006-04-16 18:30:08 +0000174# - Copy all the "*.pdb" files to where this Makefile is.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100175# - in this directory:
176# > make dosbin
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177# NSIS self installing exe:
Bram Moolenaar442b4222010-05-24 21:34:22 +0200178# - To get NSIS see http://nsis.sourceforge.net
Bram Moolenaarba460752013-07-04 22:35:01 +0200179# - Make sure gvim_ole.exe, vimw32.exe, installw32.exe,
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200180# uninstalw32.exe, teew32.exe and xxdw32.exe have been build as mentioned
181# above.
Bram Moolenaar442b4222010-05-24 21:34:22 +0200182# - copy these files (get them from a binary archive or build them):
183# gvimext.dll in src/GvimExt
184# gvimext64.dll in src/GvimExt
185# VisVim.dll in src/VisVim
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000186# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
Bram Moolenaar442b4222010-05-24 21:34:22 +0200187# gvimext64.dll can be obtained from http://code.google.com/p/vim-win3264/
Bram Moolenaarab8205e2010-07-07 15:14:03 +0200188# It is part of vim72.zip as vim72/gvimext.dll.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100189# - Make sure there is a diff.exe two levels up (get it from a previous Vim
190# version).
191# - go to ../nsis and do:
192# > makensis gvim.nsi (takes a few minutes).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193# - Copy gvim##.exe to the dist directory.
194#
Bram Moolenaarba460752013-07-04 22:35:01 +0200195# 64 bit builds (these are not in the normal distribution, the 32 bit build
196# works just fine on 64 bit systems).
197# Like the console and GUI version, but first run vcvars64.bat or
198# "..\VC\vcvarsall.bat x86_amd64".
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100199# - Build the console version:
200# > nmake -f Make_mvc.mak
201# - Build the GUI version:
202# > nmake -f Make_mvc.mak GUI=yes
203# - Build the OLE version with interfaces:
204# > bigvim64.bat
205#
Bram Moolenaarba460752013-07-04 22:35:01 +0200206#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100207# OBSOLETE systems: You can build these if you have an appropriate system.
Bram Moolenaarba460752013-07-04 22:35:01 +0200208#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100209# 16 bit DOS version: You need to get a very old version of Vim, for several
210# years even the tiny build is too big to fit in DOS memory.
Bram Moolenaarba460752013-07-04 22:35:01 +0200211#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100212# 32 bit DOS version: Support was removed in 7.4.1399. When syncing to before
213# that it probably won't build.
Bram Moolenaarba460752013-07-04 22:35:01 +0200214#
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200215# Win32s GUI version: Support was removed in patch 7.4.1364.
Bram Moolenaarba460752013-07-04 22:35:01 +0200216#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100217# OS/2 support was removed in patch 7.4.1008. If you want to give it a try
218# sync to before that and check the old version of this Makefile for
219# instructions.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000220
221VIMVER = vim-$(MAJOR).$(MINOR)
222VERSION = $(MAJOR)$(MINOR)
223VDOT = $(MAJOR).$(MINOR)
224VIMRTDIR = vim$(VERSION)
225
226# Vim used for conversion from "unix" to "dos"
227VIM = vim
228
229# How to include Filelist depends on the version of "make" you have.
230# If the current choice doesn't work, try the other one.
231
232include Filelist
233#.include "Filelist"
234
235
236# All output is put in the "dist" directory.
237dist:
238 mkdir dist
239
240# Clean up some files to avoid they are included.
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100241# Copy README files to the top directory.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000242prepare:
243 if test -f runtime/doc/uganda.nsis.txt; then \
244 rm runtime/doc/uganda.nsis.txt; fi
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100245 for name in $(IN_README_DIR); do \
246 cp READMEdir/"$$name" .; \
247 done
Bram Moolenaar071d4272004-06-13 20:20:40 +0000248
249# For the zip files we need to create a file with the comment line
250dist/comment:
251 mkdir dist/comment
252
253COMMENT_RT = comment/$(VERSION)-rt
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254COMMENT_W32 = comment/$(VERSION)-bin-w32
255COMMENT_GVIM = comment/$(VERSION)-bin-gvim
256COMMENT_OLE = comment/$(VERSION)-bin-ole
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257COMMENT_SRC = comment/$(VERSION)-src
Bram Moolenaar071d4272004-06-13 20:20:40 +0000258COMMENT_HTML = comment/$(VERSION)-html
259COMMENT_FARSI = comment/$(VERSION)-farsi
Bram Moolenaar071d4272004-06-13 20:20:40 +0000260
261dist/$(COMMENT_RT): dist/comment
262 echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
263
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264dist/$(COMMENT_W32): dist/comment
265 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
266
267dist/$(COMMENT_GVIM): dist/comment
268 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
269
270dist/$(COMMENT_OLE): dist/comment
271 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
272
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273dist/$(COMMENT_SRC): dist/comment
274 echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
275
Bram Moolenaar071d4272004-06-13 20:20:40 +0000276dist/$(COMMENT_HTML): dist/comment
277 echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
278
279dist/$(COMMENT_FARSI): dist/comment
280 echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
281
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000282unixall: dist prepare
283 -rm -f dist/$(VIMVER).tar.bz2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284 -rm -rf dist/$(VIMRTDIR)
285 mkdir dist/$(VIMRTDIR)
286 tar cf - \
287 $(RT_ALL) \
288 $(RT_ALL_BIN) \
289 $(RT_UNIX) \
290 $(RT_UNIX_DOS_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000291 $(RT_SCRIPTS) \
292 $(LANG_GEN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000293 $(LANG_GEN_BIN) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000294 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295 $(SRC_UNIX) \
296 $(SRC_DOS_UNIX) \
Bram Moolenaar864665d2010-05-15 15:41:59 +0200297 $(EXTRA) \
298 $(LANG_SRC) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299 | (cd dist/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100300 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000301# Need to use a "distclean" config.mk file
Bram Moolenaarba460752013-07-04 22:35:01 +0200302# Note: this file is not included in the repository to avoid problems, but it's
303# OK to put it in the archive.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
305# Create an empty config.h file, make dependencies require it
306 touch dist/$(VIMRTDIR)/src/auto/config.h
307# Make sure configure is newer than config.mk to force it to be generated
308 touch dist/$(VIMRTDIR)/src/configure
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309# 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
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000317 touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
Bram Moolenaar864665d2010-05-15 15:41:59 +0200318# Create the archive.
319 cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
320 bzip2 dist/$(VIMVER).tar
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321
Bram Moolenaar864665d2010-05-15 15:41:59 +0200322# Amiga runtime - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323amirt: dist prepare
324 -rm -f dist/vim$(VERSION)rt.tar.gz
325 -rm -rf dist/Vim
326 mkdir dist/Vim
327 mkdir dist/Vim/$(VIMRTDIR)
328 tar cf - \
329 $(ROOT_AMI) \
330 $(RT_ALL) \
331 $(RT_ALL_BIN) \
332 $(RT_SCRIPTS) \
333 $(RT_AMI) \
334 $(RT_NO_UNIX) \
335 $(RT_AMI_DOS) \
336 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100337 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000338 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
339 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
340 mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
341 rmdir dist/Vim/$(VIMRTDIR)/runtime
342 cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
343 gzip -9 dist/vim$(VERSION)rt.tar
344 mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
345
Bram Moolenaar864665d2010-05-15 15:41:59 +0200346# Amiga binaries - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000347amibin: 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 -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100358 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000359 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
360 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
361 cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
362 gzip -9 dist/vim$(VERSION)bin.tar
363 mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
364
Bram Moolenaar864665d2010-05-15 15:41:59 +0200365# Amiga sources - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366amisrc: dist prepare
367 -rm -f dist/vim$(VERSION)src.tar.gz
368 -rm -rf dist/Vim
369 mkdir dist/Vim
370 mkdir dist/Vim/$(VIMRTDIR)
371 tar cf - \
372 $(ROOT_AMI) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000373 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000374 $(SRC_AMI) \
375 $(SRC_AMI_DOS) \
376 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100377 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000378 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
379 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
380 cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
381 gzip -9 dist/vim$(VERSION)src.tar
382 mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
383
384no_title.vim: Makefile
385 echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
386
Bram Moolenaar442b4222010-05-24 21:34:22 +0200387# MS-DOS sources
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100388dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
389 runtime/doc/uganda.nsis.txt \
390 nsis/gvim_version.nsh
Bram Moolenaar442b4222010-05-24 21:34:22 +0200391 -rm -rf dist/vim$(VERSION)src.zip
392 -rm -rf dist/vim
393 mkdir dist/vim
394 mkdir dist/vim/$(VIMRTDIR)
395 tar cf - \
396 $(SRC_ALL) \
397 $(SRC_DOS) \
398 $(SRC_AMI_DOS) \
399 $(SRC_DOS_UNIX) \
400 runtime/doc/uganda.nsis.txt \
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100401 nsis/gvim_version.nsh \
Bram Moolenaar442b4222010-05-24 21:34:22 +0200402 | (cd dist/vim/$(VIMRTDIR); tar xf -)
403 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
404 rmdir dist/vim/$(VIMRTDIR)/runtime
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100405 # This file needs to be in dos fileformat for NSIS.
406 $(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt
Bram Moolenaar442b4222010-05-24 21:34:22 +0200407 tar cf - \
408 $(SRC_DOS_BIN) \
409 | (cd dist/vim/$(VIMRTDIR); tar xf -)
410 cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
411
412runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
413 cd runtime/doc && $(MAKE) uganda.nsis.txt
414
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100415nsis/gvim_version.nsh: Makefile
416 echo "# Generated from Makefile: define the version numbers" > $@
417 echo "!ifndef __GVIM_VER__NSH__" >> $@
418 echo "!define __GVIM_VER__NSH__" >> $@
419 echo "!define VER_MAJOR $(MAJOR)" >> $@
420 echo "!define VER_MINOR $(MINOR)" >> $@
421 echo "!endif" >> $@
422
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100423dosrt: dist dist/$(COMMENT_RT) dosrt_files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424 -rm -rf dist/vim$(VERSION)rt.zip
425 cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
426
Bram Moolenaar442b4222010-05-24 21:34:22 +0200427# Split in two parts to avoid an "argument list too long" error.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100428# We no longer convert the files from unix to dos fileformat.
429dosrt_files: dist prepare no_title.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000430 -rm -rf dist/vim
431 mkdir dist/vim
432 mkdir dist/vim/$(VIMRTDIR)
Bram Moolenaar864665d2010-05-15 15:41:59 +0200433 mkdir dist/vim/$(VIMRTDIR)/lang
434 cd src && MAKEMO=yes $(MAKE) languages
Bram Moolenaar071d4272004-06-13 20:20:40 +0000435 tar cf - \
436 $(RT_ALL) \
Bram Moolenaara5792f52005-11-23 21:25:05 +0000437 | (cd dist/vim/$(VIMRTDIR); tar xf -)
438 tar cf - \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000439 $(RT_SCRIPTS) \
440 $(RT_DOS) \
441 $(RT_NO_UNIX) \
442 $(RT_AMI_DOS) \
443 $(LANG_GEN) \
444 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445 tar cf - \
446 $(RT_UNIX_DOS_BIN) \
447 $(RT_ALL_BIN) \
448 $(RT_DOS_BIN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000449 $(LANG_GEN_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000450 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100451 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
453 rmdir dist/vim/$(VIMRTDIR)/runtime
Bram Moolenaar864665d2010-05-15 15:41:59 +0200454# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
455# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
456# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
457 for i in $(LANG_DOS); do \
458 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 \
459 n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
460 mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
461 mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
462 cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
463 fi \
464 done
Bram Moolenaar286eacd2016-01-16 18:05:50 +0100465 cp libintl-8.dll dist/vim/$(VIMRTDIR)/
466 cp libiconv-2.dll dist/vim/$(VIMRTDIR)/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467
468
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469# Used before uploading. Don't delete the AAPDIR/sign files!
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100470runtime_unix2dos: dosrt_files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471 -rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
472 cd dist/vim/$(VIMRTDIR); tar cf - * \
473 | (cd ../../../runtime/dos; tar xf -)
474
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200475dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476
477# make Win32 gvim
478dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
479 -rm -rf dist/gvim$(VERSION).zip
480 -rm -rf dist/vim
481 mkdir dist/vim
482 mkdir dist/vim/$(VIMRTDIR)
483 tar cf - \
484 $(BIN_DOS) \
485 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100486 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000487 cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200488 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000489 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
490 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
491 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
492 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
493 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
494 cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000495 cp gvim.pdb dist/gvim$(VERSION).pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496
497# make Win32 console
498dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
499 -rm -rf dist/vim$(VERSION)w32.zip
500 -rm -rf dist/vim
501 mkdir dist/vim
502 mkdir dist/vim/$(VIMRTDIR)
503 tar cf - \
504 $(BIN_DOS) \
505 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000506 cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200507 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000508 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
509 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
510 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
511 cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000512 cp vimw32.pdb dist/vim$(VERSION)w32.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000513
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514# make Win32 gvim with OLE
515dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
516 -rm -rf dist/gvim$(VERSION)ole.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 -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523 cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200524 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
526 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
527 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
528 cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
529 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
530 cp README_ole.txt dist/vim/$(VIMRTDIR)
531 cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
532 cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
533 cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000534 cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535
Bram Moolenaar071d4272004-06-13 20:20:40 +0000536html: dist dist/$(COMMENT_HTML)
537 -rm -rf dist/vim$(VERSION)html.zip
538 cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
539
540farsi: dist dist/$(COMMENT_FARSI)
541 -rm -f dist/farsi$(VERSION).zip
542 zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)