Makefile 20 KB

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