blob: 24481054158c4da0cde6034fa20427252130bde8 [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 Moolenaarb96a32e2020-08-13 18:59:55 +020035all install uninstall tools config configure reconfig proto depend lint tags types test scripttests testtiny test_libvterm 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) $@
Bram Moolenaar46acad72023-06-11 19:04:18 +010042 @# When the target is "test" also run the indent and syntax tests.
Bram Moolenaar72846cf2018-12-15 17:23:18 +010043 @if test "$@" = "test"; then \
44 $(MAKE) indenttest; \
Bram Moolenaar46acad72023-06-11 19:04:18 +010045 $(MAKE) syntaxtest; \
Bram Moolenaar72846cf2018-12-15 17:23:18 +010046 fi
Bram Moolenaar46acad72023-06-11 19:04:18 +010047 @# When the target is "clean" also clean for the indent and syntax tests.
Bram Moolenaare13a3902019-04-27 17:57:31 +020048 @if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; then \
Ben Jackson8d687a72023-06-14 15:10:02 +010049 (cd runtime/indent && $(MAKE) clean); \
50 (cd runtime/syntax && $(MAKE) clean); \
Bram Moolenaare13a3902019-04-27 17:57:31 +020051 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
Bram Moolenaar72846cf2018-12-15 17:23:18 +010053# Executable used for running the indent tests.
54VIM_FOR_INDENTTEST = ../../src/vim
55
56indenttest:
57 cd runtime/indent && \
Bram Moolenaare13a3902019-04-27 17:57:31 +020058 $(MAKE) clean && \
Bram Moolenaar72846cf2018-12-15 17:23:18 +010059 $(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
K.Takata831d6d42022-06-14 13:58:29 +010060
Bram Moolenaar46acad72023-06-11 19:04:18 +010061# Executable used for running the syntax tests.
62VIM_FOR_SYNTAXTEST = ../../src/vim
63
64syntaxtest:
65 cd runtime/syntax && \
66 $(MAKE) clean && \
K.Takatad5b952a2023-06-13 22:44:57 +010067 $(MAKE) test VIMPROG="$(VIM_FOR_SYNTAXTEST)"
Bram Moolenaar46acad72023-06-11 19:04:18 +010068
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaar864665d2010-05-15 15:41:59 +020070#########################################################################
71# 2. Creating the various distribution files.
Bram Moolenaar071d4272004-06-13 20:20:40 +000072#
73# TARGET PRODUCES CONTAINS
Bram Moolenaar864665d2010-05-15 15:41:59 +020074# unixall vim-#.#.tar.bz2 All runtime files and sources, for Unix
Bram Moolenaar071d4272004-06-13 20:20:40 +000075#
76# html vim##html.zip HTML docs
77#
Bram Moolenaar071d4272004-06-13 20:20:40 +000078# dossrc vim##src.zip sources for MS-DOS
79# dosrt vim##rt.zip runtime for MS-DOS
Bram Moolenaarfec246d2016-08-28 18:47:14 +020080# dosbin vim##w32.zip binary for Win32
Bram Moolenaar071d4272004-06-13 20:20:40 +000081# gvim##.zip binary for GUI Win32
82# gvim##ole.zip OLE exe for Win32 GUI
Bram Moolenaar864665d2010-05-15 15:41:59 +020083#
84# OBSOLETE
85# amisrc vim##src.tgz sources for Amiga
86# amirt vim##rt.tgz runtime for Amiga
87# amibin vim##bin.tgz binary for Amiga
Bram Moolenaar071d4272004-06-13 20:20:40 +000088#
Bram Moolenaar071d4272004-06-13 20:20:40 +000089# farsi farsi##.zip Farsi fonts
90#
91# All output files are created in the "dist" directory. Existing files are
92# overwritten!
Bram Moolenaar864665d2010-05-15 15:41:59 +020093# To do all this you need the Unix archive and compiled binaries.
Bram Moolenaar071d4272004-06-13 20:20:40 +000094# Before creating an archive first delete all backup files, *.orig, etc.
95
Bram Moolenaareb490412022-06-28 13:44:46 +010096MAJOR = 9
97MINOR = 0
Bram Moolenaar071d4272004-06-13 20:20:40 +000098
Bram Moolenaar071d4272004-06-13 20:20:40 +000099# CHECKLIST for creating a new version:
100#
Bram Moolenaarbb76f242016-09-12 14:24:39 +0200101# - Update Vim version number. For a test version in: src/version.h,
102# READMEdir/Contents, MAJOR/MINOR above, VIMMAJOR and VIMMINOR in
Bram Moolenaar98056532019-12-12 14:18:35 +0100103# src/Makefile, README.txt, README.md, src/README.md, READMEdir/README*.txt,
Bram Moolenaarbb76f242016-09-12 14:24:39 +0200104# runtime/doc/*.txt and make nsis/gvim_version.nsh.
K.Takata831d6d42022-06-14 13:58:29 +0100105# For a minor/major version: src/GvimExt/GvimExt.reg, src/vim.manifest.
Bram Moolenaarbfd34332019-12-07 19:24:34 +0100106# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, Lua, Cscope and
107# "huge" features. Add MZscheme if you can make it work.
108# Use "make reconfig" after selecting the configure arguments.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000109# - With these features: "make proto" (requires cproto and Motif installed;
110# ignore warnings for missing include files, fix problems for syntax errors).
111# - With these features: "make depend" (works best with gcc).
Bram Moolenaar6df6f472010-07-18 18:04:50 +0200112# - If you have a lint program: "make lint" and check the output (ignore GTK
113# warnings).
Bram Moolenaar3b1db362013-08-10 15:00:24 +0200114# - If you have valgrind, enable it in src/testdir/Makefile and run "make
115# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms.
116# Check the valgrind output.
Bram Moolenaar3b1db362013-08-10 15:00:24 +0200117# - Adjust the date and other info in src/version.h.
118# - Correct included_patches[] in src/version.c.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
120# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
121# - Do "make menu" to update the runtime/synmenu.vim file.
Bram Moolenaareb490412022-06-28 13:44:46 +0100122# - Add remarks for changes to runtime/doc/version9.txt.
Bram Moolenaar5cdd0df2007-05-12 12:58:05 +0000123# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
124# ADDITIONS".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125# - In runtime/doc run "make" and "make html" to check for errors.
Bram Moolenaar3b1db362013-08-10 15:00:24 +0200126# - Check if src/Makefile, src/testdir/Makefile and src/feature.h don't contain
127# any personal preferences or the changes mentioned above.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128# - Check file protections to be "644" for text and "755" for executables (run
129# the "check" script).
130# - Check compiling on Amiga, MS-DOS and MS-Windows.
131# - Delete all *~, *.sw?, *.orig, *.rej files
Bram Moolenaar864665d2010-05-15 15:41:59 +0200132# - "make unixall", "make html"
Bram Moolenaar5cdd0df2007-05-12 12:58:05 +0000133# - Make diff files against the previous release: "makediff7 7.1 7.2"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134#
Bram Moolenaarfff2bee2010-05-15 13:56:02 +0200135# Amiga: (OBSOLETE, Amiga files are no longer distributed)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136# - "make amisrc", move the archive to the Amiga and compile:
137# "make -f Make_manx.mak" (will use "big" features by default).
138# - Run the tests: "make -f Make_manx.mak test"
139# - Place the executables Vim and Xxd in this directory (set the executable
140# flag).
141# - "make amirt", "make amibin".
142#
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100143# MS-Windows:
Bram Moolenaar442b4222010-05-24 21:34:22 +0200144# - Run make on Unix to update the ".mo" files.
Bram Moolenaar6199d432017-10-14 19:05:44 +0200145# - Get 32 bit libintl-8.dll, libiconv-2.dll and libgcc_s_sjlj-1.dll. E.g. from
Bram Moolenaar286eacd2016-01-16 18:05:50 +0100146# https://mlocati.github.io/gettext-iconv-windows/ .
Bram Moolenaara54d2fc2017-03-04 20:09:34 +0100147# Use the "shared-32.zip file and extract the archive to get the files.
Bram Moolenaar6199d432017-10-14 19:05:44 +0200148# Put them in the gettext32 directory, "make dosrt" uses them.
149# - Get 64 bit libintl-8.dll and libiconv-2.dll. E.g. from
150# https://mlocati.github.io/gettext-iconv-windows/ .
151# Use the "shared-64.zip file and extract the archive to get the files.
152# Put them in the gettext64 directory, "make dosrt" uses them.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100153# - > make dossrc
154# > make dosrt
155# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
Bram Moolenaareb490412022-06-28 13:44:46 +0100156# This creates the directory vim/vim90 and puts all files in there.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100157# Win32 console version build:
Bram Moolenaar18cfa942017-10-08 17:58:44 +0200158# - See src/INSTALLpc.txt for installing the compiler and SDK.
159# - Set environment for Visual C++ 2015:
160# > cd src
161# > msvc2015.bat
162# - Build the console binary:
K.Takatac5125992021-05-26 21:49:18 +0200163# > nmake -f Make_mvc.mak
Bram Moolenaar4b96df52020-01-26 22:00:26 +0100164# - Run the tests and check the output:
Bram Moolenaarcb033972016-08-28 20:14:38 +0200165# > nmake -f Make_mvc.mak testclean
Bram Moolenaare292d802015-12-29 19:03:21 +0100166# > nmake -f Make_mvc.mak test
Bram Moolenaar1b010052016-09-12 12:24:11 +0200167# - Rename (using ../tools/rename.bat):
Bram Moolenaarcb033972016-08-28 20:14:38 +0200168# vim.exe to vimw32.exe
169# tee/tee.exe to teew32.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200170# xxd/xxd.exe to xxdw32.exe
Bram Moolenaarcb033972016-08-28 20:14:38 +0200171# vim.pdb to vimw32.pdb
172# install.exe to installw32.exe
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200173# uninstall.exe to uninstallw32.exe
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100174# Win32 GUI version build:
175# - > cd src
176# > nmake -f Make_mvc.mak GUI=yes
Bram Moolenaar18cfa942017-10-08 17:58:44 +0200177# - Run the tests and check the output:
Bram Moolenaarcb033972016-08-28 20:14:38 +0200178# > nmake -f Make_mvc.mak testclean
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100179# > nmake -f Make_mvc.mak testgvim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000181# - Move gvim.pdb to here.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182# - Copy "GvimExt/gvimext.dll" to here.
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200183# - Delete vimrun.exe, install.exe and uninstall.exe.
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200184# Win32 GUI version with OLE, PERL, Ruby, TCL, PYTHON and dynamic IME:
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100185# - Install the interfaces you want, see src/INSTALLpc.txt
Bram Moolenaar18cfa942017-10-08 17:58:44 +0200186# Adjust bigvim.bat to match the version of each interface you want.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100187# - Build:
188# > cd src
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100189# > bigvim.bat
Bram Moolenaare292d802015-12-29 19:03:21 +0100190# - Run the tests:
Bram Moolenaarcb033972016-08-28 20:14:38 +0200191# > nmake -f Make_mvc.mak testclean
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100192# > nmake -f Make_mvc.mak testgvim
Bram Moolenaare292d802015-12-29 19:03:21 +0100193# - check the output.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194# - Rename "gvim.exe" to "gvim_ole.exe".
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000195# - Rename gvim.pdb to "gvim_ole.pdb".
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200196# - Delete install.exe and uninstall.exe.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197# Create the archives:
198# - Copy all the "*.exe" files to where this Makefile is.
Bram Moolenaarb21e5842006-04-16 18:30:08 +0000199# - Copy all the "*.pdb" files to where this Makefile is.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100200# - in this directory:
201# > make dosbin
Bram Moolenaar071d4272004-06-13 20:20:40 +0000202# NSIS self installing exe:
Bram Moolenaar442b4222010-05-24 21:34:22 +0200203# - To get NSIS see http://nsis.sourceforge.net
Bram Moolenaarba460752013-07-04 22:35:01 +0200204# - Make sure gvim_ole.exe, vimw32.exe, installw32.exe,
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200205# uninstallw32.exe, teew32.exe and xxdw32.exe have been build as mentioned
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200206# above.
Bram Moolenaar442b4222010-05-24 21:34:22 +0200207# - copy these files (get them from a binary archive or build them):
208# gvimext.dll in src/GvimExt
209# gvimext64.dll in src/GvimExt
Bram Moolenaar81b07b52017-10-15 21:43:21 +0200210# gvimext64.dll can be obtained from:
211# https://github.com/vim/vim-win32-installer/releases
Bram Moolenaareb490412022-06-28 13:44:46 +0100212# It is part of gvim_9.0.*_x64.zip as vim/vim90/GvimExt/gvimext64.dll.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100213# - Make sure there is a diff.exe two levels up (get it from a previous Vim
Bram Moolenaar18cfa942017-10-08 17:58:44 +0200214# version). Also put winpty32.dll and winpty-agent.exe there.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100215# - go to ../nsis and do:
Bram Moolenaar24877cf2019-01-10 21:51:48 +0100216# > unzip icons.zip
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100217# > makensis gvim.nsi (takes a few minutes).
Bram Moolenaarbb76f242016-09-12 14:24:39 +0200218# ignore warning for libwinpthread-1.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000219# - Copy gvim##.exe to the dist directory.
220#
Bram Moolenaarba460752013-07-04 22:35:01 +0200221# 64 bit builds (these are not in the normal distribution, the 32 bit build
222# works just fine on 64 bit systems).
223# Like the console and GUI version, but first run vcvars64.bat or
224# "..\VC\vcvarsall.bat x86_amd64".
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100225# - Build the console version:
226# > nmake -f Make_mvc.mak
227# - Build the GUI version:
228# > nmake -f Make_mvc.mak GUI=yes
229# - Build the OLE version with interfaces:
230# > bigvim64.bat
231#
Bram Moolenaarba460752013-07-04 22:35:01 +0200232#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100233# OBSOLETE systems: You can build these if you have an appropriate system.
Bram Moolenaarba460752013-07-04 22:35:01 +0200234#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100235# 16 bit DOS version: You need to get a very old version of Vim, for several
236# years even the tiny build is too big to fit in DOS memory.
Bram Moolenaarba460752013-07-04 22:35:01 +0200237#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100238# 32 bit DOS version: Support was removed in 7.4.1399. When syncing to before
239# that it probably won't build.
Bram Moolenaarba460752013-07-04 22:35:01 +0200240#
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200241# Win32s GUI version: Support was removed in patch 7.4.1364.
Bram Moolenaarba460752013-07-04 22:35:01 +0200242#
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100243# OS/2 support was removed in patch 7.4.1008. If you want to give it a try
244# sync to before that and check the old version of this Makefile for
245# instructions.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000246
247VIMVER = vim-$(MAJOR).$(MINOR)
248VERSION = $(MAJOR)$(MINOR)
249VDOT = $(MAJOR).$(MINOR)
250VIMRTDIR = vim$(VERSION)
251
252# Vim used for conversion from "unix" to "dos"
253VIM = vim
254
255# How to include Filelist depends on the version of "make" you have.
256# If the current choice doesn't work, try the other one.
257
258include Filelist
259#.include "Filelist"
260
261
262# All output is put in the "dist" directory.
263dist:
264 mkdir dist
265
266# Clean up some files to avoid they are included.
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100267# Copy README files to the top directory.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000268prepare:
269 if test -f runtime/doc/uganda.nsis.txt; then \
270 rm runtime/doc/uganda.nsis.txt; fi
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100271 for name in $(IN_README_DIR); do \
272 cp READMEdir/"$$name" .; \
273 done
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274
275# For the zip files we need to create a file with the comment line
276dist/comment:
277 mkdir dist/comment
278
279COMMENT_RT = comment/$(VERSION)-rt
Bram Moolenaar071d4272004-06-13 20:20:40 +0000280COMMENT_W32 = comment/$(VERSION)-bin-w32
281COMMENT_GVIM = comment/$(VERSION)-bin-gvim
282COMMENT_OLE = comment/$(VERSION)-bin-ole
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283COMMENT_SRC = comment/$(VERSION)-src
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284COMMENT_HTML = comment/$(VERSION)-html
285COMMENT_FARSI = comment/$(VERSION)-farsi
Bram Moolenaar071d4272004-06-13 20:20:40 +0000286
287dist/$(COMMENT_RT): dist/comment
288 echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
289
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290dist/$(COMMENT_W32): dist/comment
291 echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
292
293dist/$(COMMENT_GVIM): dist/comment
294 echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
295
296dist/$(COMMENT_OLE): dist/comment
297 echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
298
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299dist/$(COMMENT_SRC): dist/comment
300 echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
301
Bram Moolenaar071d4272004-06-13 20:20:40 +0000302dist/$(COMMENT_HTML): dist/comment
303 echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
304
305dist/$(COMMENT_FARSI): dist/comment
306 echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
307
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000308unixall: dist prepare
309 -rm -f dist/$(VIMVER).tar.bz2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310 -rm -rf dist/$(VIMRTDIR)
311 mkdir dist/$(VIMRTDIR)
312 tar cf - \
313 $(RT_ALL) \
314 $(RT_ALL_BIN) \
315 $(RT_UNIX) \
316 $(RT_UNIX_DOS_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317 $(RT_SCRIPTS) \
318 $(LANG_GEN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000319 $(LANG_GEN_BIN) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000320 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321 $(SRC_UNIX) \
322 $(SRC_DOS_UNIX) \
Bram Moolenaar864665d2010-05-15 15:41:59 +0200323 $(EXTRA) \
324 $(LANG_SRC) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325 | (cd dist/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100326 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000327# Need to use a "distclean" config.mk file
Bram Moolenaarba460752013-07-04 22:35:01 +0200328# Note: this file is not included in the repository to avoid problems, but it's
329# OK to put it in the archive.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330 cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
331# Create an empty config.h file, make dependencies require it
332 touch dist/$(VIMRTDIR)/src/auto/config.h
333# Make sure configure is newer than config.mk to force it to be generated
334 touch dist/$(VIMRTDIR)/src/configure
Bram Moolenaar071d4272004-06-13 20:20:40 +0000335# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
336# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
337 touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
338 touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
339 touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
340 touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
341 touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
342 touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000343 touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
Bram Moolenaar864665d2010-05-15 15:41:59 +0200344# Create the archive.
345 cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
346 bzip2 dist/$(VIMVER).tar
Bram Moolenaar071d4272004-06-13 20:20:40 +0000347
Bram Moolenaar864665d2010-05-15 15:41:59 +0200348# Amiga runtime - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000349amirt: dist prepare
350 -rm -f dist/vim$(VERSION)rt.tar.gz
351 -rm -rf dist/Vim
352 mkdir dist/Vim
353 mkdir dist/Vim/$(VIMRTDIR)
354 tar cf - \
355 $(ROOT_AMI) \
356 $(RT_ALL) \
357 $(RT_ALL_BIN) \
358 $(RT_SCRIPTS) \
359 $(RT_AMI) \
360 $(RT_NO_UNIX) \
361 $(RT_AMI_DOS) \
362 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100363 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
365 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
366 mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
367 rmdir dist/Vim/$(VIMRTDIR)/runtime
368 cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
369 gzip -9 dist/vim$(VERSION)rt.tar
370 mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
371
Bram Moolenaar864665d2010-05-15 15:41:59 +0200372# Amiga binaries - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000373amibin: dist prepare
374 -rm -f dist/vim$(VERSION)bin.tar.gz
375 -rm -rf dist/Vim
376 mkdir dist/Vim
377 mkdir dist/Vim/$(VIMRTDIR)
378 tar cf - \
379 $(ROOT_AMI) \
380 $(BIN_AMI) \
381 Vim \
382 Xxd \
383 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100384 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
386 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
387 cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
388 gzip -9 dist/vim$(VERSION)bin.tar
389 mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
390
Bram Moolenaar864665d2010-05-15 15:41:59 +0200391# Amiga sources - OBSOLETE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392amisrc: dist prepare
393 -rm -f dist/vim$(VERSION)src.tar.gz
394 -rm -rf dist/Vim
395 mkdir dist/Vim
396 mkdir dist/Vim/$(VIMRTDIR)
397 tar cf - \
398 $(ROOT_AMI) \
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +0000399 $(SRC_ALL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000400 $(SRC_AMI) \
401 $(SRC_AMI_DOS) \
402 | (cd dist/Vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100403 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000404 mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
405 mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
406 cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
407 gzip -9 dist/vim$(VERSION)src.tar
408 mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
409
410no_title.vim: Makefile
411 echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
412
Bram Moolenaar442b4222010-05-24 21:34:22 +0200413# MS-DOS sources
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100414dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
415 runtime/doc/uganda.nsis.txt \
416 nsis/gvim_version.nsh
Bram Moolenaar442b4222010-05-24 21:34:22 +0200417 -rm -rf dist/vim$(VERSION)src.zip
418 -rm -rf dist/vim
419 mkdir dist/vim
420 mkdir dist/vim/$(VIMRTDIR)
421 tar cf - \
422 $(SRC_ALL) \
423 $(SRC_DOS) \
Bram Moolenaardaaca8a2022-07-02 17:58:23 +0100424 $(SRC_DOS_BIN) \
Bram Moolenaar442b4222010-05-24 21:34:22 +0200425 $(SRC_AMI_DOS) \
426 $(SRC_DOS_UNIX) \
427 runtime/doc/uganda.nsis.txt \
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100428 nsis/gvim_version.nsh \
Bram Moolenaar442b4222010-05-24 21:34:22 +0200429 | (cd dist/vim/$(VIMRTDIR); tar xf -)
430 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
431 rmdir dist/vim/$(VIMRTDIR)/runtime
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100432 # This file needs to be in dos fileformat for NSIS.
433 $(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 +0200434 cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
435
436runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
437 cd runtime/doc && $(MAKE) uganda.nsis.txt
438
Bram Moolenaar6c7b4442016-01-02 15:44:32 +0100439nsis/gvim_version.nsh: Makefile
440 echo "# Generated from Makefile: define the version numbers" > $@
441 echo "!ifndef __GVIM_VER__NSH__" >> $@
442 echo "!define __GVIM_VER__NSH__" >> $@
443 echo "!define VER_MAJOR $(MAJOR)" >> $@
444 echo "!define VER_MINOR $(MINOR)" >> $@
445 echo "!endif" >> $@
446
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100447dosrt: dist dist/$(COMMENT_RT) dosrt_files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000448 -rm -rf dist/vim$(VERSION)rt.zip
449 cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
450
Bram Moolenaar442b4222010-05-24 21:34:22 +0200451# Split in two parts to avoid an "argument list too long" error.
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100452# We no longer convert the files from unix to dos fileformat.
453dosrt_files: dist prepare no_title.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000454 -rm -rf dist/vim
455 mkdir dist/vim
456 mkdir dist/vim/$(VIMRTDIR)
Bram Moolenaar864665d2010-05-15 15:41:59 +0200457 mkdir dist/vim/$(VIMRTDIR)/lang
458 cd src && MAKEMO=yes $(MAKE) languages
Bram Moolenaar071d4272004-06-13 20:20:40 +0000459 tar cf - \
460 $(RT_ALL) \
Bram Moolenaara5792f52005-11-23 21:25:05 +0000461 | (cd dist/vim/$(VIMRTDIR); tar xf -)
462 tar cf - \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000463 $(RT_SCRIPTS) \
464 $(RT_DOS) \
465 $(RT_NO_UNIX) \
466 $(RT_AMI_DOS) \
467 $(LANG_GEN) \
468 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469 tar cf - \
470 $(RT_UNIX_DOS_BIN) \
471 $(RT_ALL_BIN) \
472 $(RT_DOS_BIN) \
Bram Moolenaar5482f332005-04-17 20:18:43 +0000473 $(LANG_GEN_BIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar818c9e72016-03-19 16:09:42 +0100475 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476 mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
477 rmdir dist/vim/$(VIMRTDIR)/runtime
Bram Moolenaar24877cf2019-01-10 21:51:48 +0100478# Add the message translations. Trick: skip ja.mo/ja.euc-jp.mo and use
479# ja.sjis.mo instead. Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo,
480# sk.mo / sk.cp1250.mo, zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and
481# ru.mo / ru.cp1251.mo.
Bram Moolenaar864665d2010-05-15 15:41:59 +0200482 for i in $(LANG_DOS); do \
Bram Moolenaar24877cf2019-01-10 21:51:48 +0100483 if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/ja.euc-jp.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 Moolenaar864665d2010-05-15 15:41:59 +0200484 n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
485 mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
486 mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
487 cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
488 fi \
489 done
Bram Moolenaar6199d432017-10-14 19:05:44 +0200490 mkdir dist/vim/$(VIMRTDIR)/gettext32
491 cp gettext32/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext32/
492 cp gettext32/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext32/
493 cp gettext32/libgcc_s_sjlj-1.dll dist/vim/$(VIMRTDIR)/gettext32/
494 mkdir dist/vim/$(VIMRTDIR)/gettext64
495 cp gettext64/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext64/
496 cp gettext64/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext64/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000497
498
Bram Moolenaar071d4272004-06-13 20:20:40 +0000499# Used before uploading. Don't delete the AAPDIR/sign files!
Bram Moolenaar2c15f6a2016-01-02 15:00:30 +0100500runtime_unix2dos: dosrt_files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501 -rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
502 cd dist/vim/$(VIMRTDIR); tar cf - * \
503 | (cd ../../../runtime/dos; tar xf -)
504
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200505dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S)
Bram Moolenaarcb033972016-08-28 20:14:38 +0200506 -rm $(IN_README_DIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000507
508# make Win32 gvim
509dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
510 -rm -rf dist/gvim$(VERSION).zip
511 -rm -rf dist/vim
512 mkdir dist/vim
513 mkdir dist/vim/$(VIMRTDIR)
514 tar cf - \
515 $(BIN_DOS) \
516 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000517 cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200518 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
520 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
521 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200522 cp uninstallw32.exe dist/vim/$(VIMRTDIR)/uninstall.exe
Bram Moolenaar6199d432017-10-14 19:05:44 +0200523 mkdir dist/vim/$(VIMRTDIR)/GvimExt32
524 cp gvimext.dll dist/vim/$(VIMRTDIR)/GvimExt32/gvimext.dll
525 mkdir dist/vim/$(VIMRTDIR)/GvimExt64
526 cp gvimext64.dll dist/vim/$(VIMRTDIR)/GvimExt64/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527 cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000528 cp gvim.pdb dist/gvim$(VERSION).pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529
530# make Win32 console
531dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
532 -rm -rf dist/vim$(VERSION)w32.zip
533 -rm -rf dist/vim
534 mkdir dist/vim
535 mkdir dist/vim/$(VIMRTDIR)
536 tar cf - \
537 $(BIN_DOS) \
538 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000539 cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200540 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000541 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
542 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200543 cp uninstallw32.exe dist/vim/$(VIMRTDIR)/uninstall.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000544 cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000545 cp vimw32.pdb dist/vim$(VERSION)w32.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546
Bram Moolenaar071d4272004-06-13 20:20:40 +0000547# make Win32 gvim with OLE
548dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
549 -rm -rf dist/gvim$(VERSION)ole.zip
550 -rm -rf dist/vim
551 mkdir dist/vim
552 mkdir dist/vim/$(VIMRTDIR)
553 tar cf - \
554 $(BIN_DOS) \
555 | (cd dist/vim/$(VIMRTDIR); tar xf -)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000556 cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
Bram Moolenaarfec246d2016-08-28 18:47:14 +0200557 cp teew32.exe dist/vim/$(VIMRTDIR)/tee.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558 cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
559 cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
560 cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
Bram Moolenaar30e8e732019-09-27 13:08:36 +0200561 cp uninstallw32.exe dist/vim/$(VIMRTDIR)/uninstall.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +0000562 cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
563 cp README_ole.txt dist/vim/$(VIMRTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000564 cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000565 cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566
Bram Moolenaar071d4272004-06-13 20:20:40 +0000567html: dist dist/$(COMMENT_HTML)
568 -rm -rf dist/vim$(VERSION)html.zip
569 cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
570
571farsi: dist dist/$(COMMENT_FARSI)
572 -rm -f dist/farsi$(VERSION).zip
573 zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)