Mercurial > vim
annotate src/main.aap @ 9719:219dbe63ad2a v7.4.2135
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 31 14:17:27 2016 +0200
patch 7.4.2135
Problem: Various tiny issues.
Solution: Update comments, white space, etc.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 31 Jul 2016 14:30:05 +0200 |
parents | ea504064c996 |
children | 7a4fb555c83a |
rev | line source |
---|---|
7 | 1 # A-A-P recipe for building Vim |
2 # | |
3 # There are no user choices in here! | |
4 # Put configure arguments in the file config.arg. | |
5 # Later there will be a config.txt file that contains examples and | |
6 # explanations. | |
7 # | |
8 # Optional arguments: | |
532 | 9 # PREFIX=dir Overrules the install directory. |
10 # Can be specified when installing only. | |
11 # Example: aap install PREFIX=$HOME | |
7 | 12 # |
796 | 13 @if os.name != "posix": |
14 :error Sorry, this recipe only works for Unix-like systems. | |
7 | 15 |
16 # Skip the configure stuff when "link.sh" is executing this recipe recursively | |
17 # to build pathdef.c or not building something and auto/config.aap does exist. | |
18 @if ((_no.TARGETARG != "pathdef" and has_build_target()) | |
532 | 19 @ or not os.path.exists("auto/config.aap")): |
7 | 20 |
21 # | |
22 # A U T O C O N F | |
23 # | |
24 | |
25 # Run autoconf when configure.in has been changed since it was last run. | |
26 # This is skipped when the signatures in "mysign" are up-to-date. When | |
27 # there is no autoconf program skip this (the signature is often the only | |
28 # thing that's outdated) | |
29 auto/configure {signfile = mysign} : configure.in | |
532 | 30 @if not program_path("autoconf"): |
31 :print Can't find autoconf, using existing configure script. | |
32 @else: | |
7 | 33 # Move configure aside, autoconf would overwrite it |
34 :move {exist} configure configure.save | |
35 :sys autoconf | |
663 | 36 :cat configure | :eval re.sub('\\./config.log', 'auto/config.log', stdin) | :eval re.sub('>config.log', '>auto/config.log', stdin) >! auto/configure |
7 | 37 :chmod 755 auto/configure |
38 :move configure.save configure | |
39 :del {force} auto/config.cache auto/config.status | |
40 | |
41 # Change the configure script to produce config.aap instead of config.mk. | |
42 auto/configure.aap : auto/configure | |
532 | 43 :print Adjusting auto/configure for A-A-P. |
44 :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin) | |
45 >! auto/configure.aap | |
46 :chmod 755 auto/configure.aap | |
7 | 47 |
48 # The configure script uses the directory where it's located, use a link. | |
49 configure.aap: {buildcheck=} | |
532 | 50 :symlink {f} auto/configure.aap configure.aap |
7 | 51 |
52 # Dependency: run configure.aap to update config.h and config.aap in the | |
53 # "auto" directory. | |
796 | 54 # NOTE: we can only build for one architecture, because -MM doesn't work |
55 # when building for both. | |
7 | 56 config {virtual} auto/config.h auto/config.aap : |
532 | 57 auto/configure.aap configure.aap |
58 config.arg config.h.in config.aap.in | |
1407 | 59 # Use "uname -a" to detect the architecture of the system. |
60 @ok, uname = redir_system('uname -a', 0) | |
61 @if string.find(uname, "i386") >= 0: | |
62 @ arch = "i386" | |
63 @else: | |
64 @ arch = "ppc" | |
65 :print Building for $arch system | |
1461 | 66 config_args = `file2string("config.arg")` |
532 | 67 :sys CONFIG_STATUS=auto/config.status |
1461 | 68 ./configure.aap $config_args |
1407 | 69 --with-mac-arch=$arch |
7 | 70 --cache-file=auto/config.cache |
71 | |
72 # Configure arguments: create an empty "config.arg" file when its missing | |
73 config.arg: | |
532 | 74 :touch {exist} config.arg |
7 | 75 |
76 # "auto/config.aap" contains a lot of settings, such as the name of the | |
77 # executable "Target". | |
78 # First update it, forcefully if the "reconfig" target was used. | |
79 @if _no.TARGETARG != "comment" and _no.TARGETARG != "make": | |
532 | 80 @if "reconfig" in var2list(_no.TARGETARG): |
81 :del {force} auto/config.cache auto/config.status | |
82 :update {force} auto/config.aap | |
83 @else: | |
84 :update auto/config.aap | |
7 | 85 |
86 # Include the recipe that autoconf generated. | |
87 :include auto/config.aap | |
88 | |
690 | 89 # Unfortunately "-M" doesn't work when building for two architectures. Switch |
90 # back to PPC only. | |
91 @if string.find(_no.CPPFLAGS, "-arch i386 -arch ppc") >= 0: | |
92 CPPFLAGS = `string.replace(_no.CPPFLAGS, "-arch i386 -arch ppc", "-arch ppc")` | |
93 | |
7 | 94 # A "PREFIX=dir" argument overrules the value of $prefix |
796 | 95 # But don't use the default "/usr/local". |
96 @if _no.get("PREFIX") and _no.get("PREFIX") != '/usr/local': | |
7 | 97 prefix = $PREFIX |
98 | |
99 # Don't want "~/" in prefix. | |
100 prefix = `os.path.expanduser(prefix)` | |
101 | |
796 | 102 # For Mac. |
103 APPDIR = $(VIMNAME).app | |
104 | |
105 ### Names of the programs and targets | |
106 VIMTARGET = $VIMNAME$EXESUF | |
107 EXTARGET = $EXNAME$LNKSUF | |
108 VIEWTARGET = $VIEWNAME$LNKSUF | |
109 GVIMNAME = g$VIMNAME | |
110 GVIMTARGET = $GVIMNAME$LNKSUF | |
111 GVIEWNAME = g$VIEWNAME | |
112 GVIEWTARGET = $GVIEWNAME$LNKSUF | |
113 RVIMNAME = r$VIMNAME | |
114 RVIMTARGET = $RVIMNAME$LNKSUF | |
115 RVIEWNAME = r$VIEWNAME | |
116 RVIEWTARGET = $RVIEWNAME$LNKSUF | |
117 RGVIMNAME = r$GVIMNAME | |
118 RGVIMTARGET = $RGVIMNAME$LNKSUF | |
119 RGVIEWNAME = r$GVIEWNAME | |
120 RGVIEWTARGET = $RGVIEWNAME$LNKSUF | |
121 VIMDIFFNAME = $(VIMNAME)diff | |
122 GVIMDIFFNAME = g$VIMDIFFNAME | |
123 VIMDIFFTARGET = $VIMDIFFNAME$LNKSUF | |
124 GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF | |
125 EVIMNAME = e$VIMNAME | |
126 EVIMTARGET = $EVIMNAME$LNKSUF | |
127 EVIEWNAME = e$VIEWNAME | |
128 EVIEWTARGET = $EVIEWNAME$LNKSUF | |
129 | |
7 | 130 # |
131 # G U I variant | |
132 # | |
133 # The GUI is selected by configure, a lot of other things depend on it. | |
134 # | |
135 :variant GUI | |
136 GTK | |
532 | 137 GUI_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c |
138 gui_gtk_f.c | |
139 GUI_OBJ = | |
140 GUI_DEFS = -DFEAT_GUI_GTK $NARROW_PROTO | |
141 GUI_IPATH = $GUI_INC_LOC | |
142 GUI_LIBS_DIR = $GUI_LIB_LOC | |
143 GUI_LIBS1 = | |
144 GUI_LIBS2 = $GTK_LIBNAME | |
796 | 145 GUI_INSTALL = install_normal |
532 | 146 GUI_TARGETS = installglinks |
796 | 147 GUI_MAN_TARGETS = yes |
532 | 148 GUI_TESTTARGET = gui |
796 | 149 GUI_BUNDLE = |
150 GUI_TESTARG = | |
7 | 151 MOTIF |
532 | 152 GUI_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c |
153 gui_xmdlg.c gui_xmebw.c | |
154 GUI_OBJ = | |
155 GUI_DEFS = -DFEAT_GUI_MOTIF $NARROW_PROTO | |
156 GUI_IPATH = $GUI_INC_LOC | |
157 GUI_LIBS_DIR = $GUI_LIB_LOC | |
158 GUI_LIBS1 = | |
159 GUI_LIBS2 = $MOTIF_LIBNAME -lXt | |
796 | 160 GUI_INSTALL = install_normal |
532 | 161 GUI_TARGETS = installglinks |
796 | 162 GUI_MAN_TARGETS = yes |
532 | 163 GUI_TESTTARGET = gui |
796 | 164 GUI_BUNDLE = |
165 GUI_TESTARG = | |
7 | 166 ATHENA |
532 | 167 # XAW_LIB et al. can be overruled to use Xaw3d widgets |
168 XAW_LIB ?= -lXaw | |
169 GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \ | |
170 gui_at_sb.c gui_at_fs.c | |
171 GUI_OBJ = | |
172 GUI_DEFS = -DFEAT_GUI_ATHENA $NARROW_PROTO | |
173 GUI_IPATH = $GUI_INC_LOC | |
174 GUI_LIBS_DIR = $GUI_LIB_LOC | |
175 GUI_LIBS1 = $XAW_LIB | |
176 GUI_LIBS2 = -lXt | |
796 | 177 GUI_INSTALL = install_normal |
532 | 178 GUI_TARGETS = installglinks |
796 | 179 GUI_MAN_TARGETS = yes |
532 | 180 GUI_TESTTARGET = gui |
796 | 181 GUI_BUNDLE = |
182 GUI_TESTARG = | |
7 | 183 NEXTAW |
532 | 184 # XAW_LIB et al. can be overruled to use Xaw3d widgets |
185 XAW_LIB ?= -lXaw | |
186 GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c | |
187 gui_at_fs.c | |
188 GUI_OBJ = | |
189 GUI_DEFS = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO | |
190 GUI_IPATH = $GUI_INC_LOC | |
191 GUI_LIBS_DIR = $GUI_LIB_LOC | |
192 GUI_LIBS1 = $NEXTAW_LIB | |
193 GUI_LIBS2 = -lXt | |
796 | 194 GUI_INSTALL = install_normal |
532 | 195 GUI_TARGETS = installglinks |
796 | 196 GUI_MAN_TARGETS = yes |
532 | 197 GUI_TESTTARGET = gui |
796 | 198 GUI_BUNDLE = |
199 GUI_TESTARG = | |
200 CARBONGUI | |
201 GUI_SRC = gui.c gui_mac.c pty.c | |
202 GUI_OBJ = | |
203 GUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \ | |
204 -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe | |
205 GUI_IPATH = $GUI_INC_LOC | |
206 GUI_LIBS_DIR = $GUI_LIB_LOC | |
207 GUI_LIBS1 = -framework Carbon | |
208 GUI_LIBS2 = | |
209 GUI_INSTALL = install_macosx | |
210 GUI_TARGETS = installglinks | |
211 GUI_MAN_TARGETS = yes | |
212 GUI_TESTTARGET = gui | |
213 GUI_BUNDLE = gui_bundle | |
214 GUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) | |
7 | 215 PHOTONGUI |
532 | 216 GUI_SRC = gui.c gui_photon.c pty.c |
217 GUI_OBJ = | |
218 GUI_DEFS = -DFEAT_GUI_PHOTON | |
219 GUI_IPATH = | |
220 GUI_LIBS_DIR = | |
221 GUI_LIBS1 = -lph -lphexlib | |
222 GUI_LIBS2 = | |
796 | 223 GUI_INSTALL = install_normal |
532 | 224 GUI_TARGETS = installglinks |
796 | 225 GUI_MAN_TARGETS = yes |
532 | 226 GUI_TESTTARGET = gui |
796 | 227 GUI_BUNDLE = |
228 GUI_TESTARG = | |
7 | 229 * |
532 | 230 GUI_SRC = |
231 GUI_OBJ = | |
232 GUI_DEFS = | |
233 GUI_IPATH = | |
234 GUI_LIBS_DIR = | |
235 GUI_LIBS1 = | |
236 GUI_LIBS2 = | |
796 | 237 GUI_INSTALL = install_normal |
532 | 238 GUI_TARGETS = |
239 GUI_MAN_TARGETS = | |
240 GUI_TESTTARGET = | |
796 | 241 GUI_BUNDLE = |
242 GUI_TESTARG = | |
7 | 243 |
244 | |
245 PRE_DEFS = -Iproto -I. $DEFS $GUI_DEFS $GUI_IPATH $CPPFLAGS $?(EXTRA_IPATHS) | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2200
diff
changeset
|
246 POST_DEFS = $X_CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $?(EXTRA_DEFS) |
7 | 247 CFLAGS = $PRE_DEFS $CONF_CFLAGS $?(PROFILE_CFLAGS) $POST_DEFS |
248 CPPFLAGS = | |
249 | |
250 ALL_LIB_DIRS = $GUI_LIBS_DIR $X_LIBS_DIR | |
251 LDFLAGS = $ALL_LIB_DIRS $CONF_LDFLAGS | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2200
diff
changeset
|
252 LIBS = $GUI_LIBS1 $GUI_X_LIBS $GUI_LIBS2 $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $CONF_LIBS $?(EXTRA_LIBS) $LUA_LIBS $MZSCHEME_LIBS $PERL_LIBS $PYTHON_LIBS $TCL_LIBS $RUBY_LIBS $?(PROFILE_LIBS) |
7 | 253 |
254 Target = $VIMNAME | |
255 | |
256 # reconfig target also builds Vim (reconfiguration is handled above). | |
257 reconfig {virtual}: $Target | |
258 | |
796 | 259 distclean: clean |
260 :del {force} auto/config.h auto/config.aap | |
261 :del {force} auto/config.cache auto/config.status | |
262 | |
7 | 263 |
264 # Execute the test scripts. Run these after compiling Vim, before installing. | |
265 # | |
266 # This will produce a lot of garbage on your screen, including a few error | |
267 # messages. Don't worry about that. | |
268 # If there is a real error, there will be a difference between "test.out" and | |
269 # a "test99.ok" file. | |
2154
7c8c7c95a865
First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents:
1461
diff
changeset
|
270 # If everything is alright, the final message will be "ALL DONE". If not you |
7c8c7c95a865
First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents:
1461
diff
changeset
|
271 # get "TEST FAILURE". |
7 | 272 # |
273 test check: | |
274 VimProg = ../$Target | |
796 | 275 :execute testdir/main.aap $GUI_TESTTARGET $GUI_TESTARG |
7 | 276 |
277 testclean {virtual}: | |
278 :del {force} testdir/*.out testdir/test.log | |
279 | |
280 # When no fetch target exists we are not a child of the ../main.aap recipe, | |
281 # Use ../main.aap to do the fetching. | |
282 # --- If you get an error here for wrong number of arguments, you need to | |
283 # update to a newer version of A-A-P. | |
284 @if not has_target("fetch"): | |
285 fetch: | |
532 | 286 :execute ../main.aap fetch |
7 | 287 |
288 | |
289 # All the source files that need to be compiled. | |
290 # Some are optional and depend on configure. | |
291 # "version.c" is missing, it's always compiled (see below). | |
292 Source = | |
2200
99ba9a30755a
Various smaller changes. Updated proto files. Updated dependencies.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
293 blowfish.c |
532 | 294 buffer.c |
295 charset.c | |
296 diff.c | |
297 digraph.c | |
298 edit.c | |
299 eval.c | |
300 ex_cmds.c | |
301 ex_cmds2.c | |
302 ex_docmd.c | |
303 ex_eval.c | |
304 ex_getln.c | |
305 fileio.c | |
306 fold.c | |
307 getchar.c | |
446 | 308 hardcopy.c |
815 | 309 hashtab.c |
532 | 310 if_cscope.c |
311 if_xcmdsrv.c | |
312 main.c | |
313 mark.c | |
314 memfile.c | |
315 memline.c | |
316 menu.c | |
317 message.c | |
318 misc1.c | |
319 misc2.c | |
320 move.c | |
321 mbyte.c | |
322 normal.c | |
323 ops.c | |
324 option.c | |
325 os_unix.c | |
326 auto/pathdef.c | |
815 | 327 popupmnu.c |
532 | 328 quickfix.c |
329 regexp.c | |
330 screen.c | |
331 search.c | |
2200
99ba9a30755a
Various smaller changes. Updated proto files. Updated dependencies.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
332 sha256.c |
532 | 333 spell.c |
334 syntax.c | |
335 tag.c | |
336 term.c | |
337 ui.c | |
338 undo.c | |
339 window.c | |
340 $OS_EXTRA_SRC | |
341 $GUI_SRC | |
342 $HANGULIN_SRC | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2200
diff
changeset
|
343 $LUA_SRC |
16 | 344 $MZSCHEME_SRC |
532 | 345 $PERL_SRC |
346 $NETBEANS_SRC | |
347 $PYTHON_SRC | |
348 $TCL_SRC | |
349 $RUBY_SRC | |
350 $WORKSHOP_SRC | |
7 | 351 |
16 | 352 Objects = |
532 | 353 $GUI_OBJ |
16 | 354 |
7 | 355 # TODO: make is still used for subdirectories, need to write a recipe. |
356 MAKE ?= make | |
357 | |
796 | 358 all: $Target $GUI_BUNDLE |
7 | 359 |
360 # This dependency is required to build auto/osdef.h before automatic | |
361 # dependencies are generated. | |
362 $Source version.c : auto/osdef.h | |
363 | |
364 # Need to mention that the target also depends on version.c, since it's not | |
1188 | 365 # included in $Source |
7 | 366 $Target : version.c |
367 | |
368 # Some sources are to be found in the "auto" directory. | |
369 SRCPATH += auto | |
370 | |
371 # When building Vim always compile version.c to get the timestamp. | |
372 :filetype | |
373 declare my_prog | |
374 :attr {filetype = my_prog} $Target | |
375 | |
16 | 376 :program $Target : $Source $Objects |
7 | 377 |
378 :action build my_prog object | |
532 | 379 version_obj = `src2obj("version.c")` |
380 :do compile {target = $version_obj} version.c | |
381 #:do build {target = $target {filetype = program}} $source $version_obj | |
382 link_sed = $BDIR/link.sed | |
383 @if os.path.exists(link_sed): | |
384 :move {force} $link_sed auto/link.sed | |
385 @else: | |
386 :del {force} auto/link.sed | |
387 :update link2.sh | |
388 :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \ | |
389 -o $target $source $version_obj $LIBS" \ | |
390 MAKE="aap" sh ./link2.sh | |
391 :copy {force} auto/link.sed $BDIR/link.sed | |
7 | 392 |
393 # "link.sh" must be modified for A-A-P | |
394 link2.sh : link.sh | |
395 :print Adjusting $-source for A-A-P. | |
396 :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin) | |
532 | 397 >! $target |
7 | 398 |
399 xxd/xxd$EXESUF: xxd/xxd.c | |
400 :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \ | |
532 | 401 $MAKE -f Makefile |
7 | 402 |
403 # Build the language specific files if they were unpacked. | |
404 # Generate the converted .mo files separately, it's no problem if this fails. | |
405 languages {virtual}: | |
532 | 406 @if _no.MAKEMO: |
407 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix | |
408 @try: | |
409 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted | |
410 @except: | |
411 :print Generated converted language files failed, continuing | |
7 | 412 |
413 # Update the *.po files for changes in the sources. Only run manually. | |
414 update-po {virtual}: | |
532 | 415 cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po |
7 | 416 |
417 auto/if_perl.c: if_perl.xs | |
532 | 418 :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target |
419 :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \ | |
420 $PERLLIB/ExtUtils/typemap if_perl.xs >> $target | |
7 | 421 |
422 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in | |
532 | 423 :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh |
7 | 424 |
425 pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF | |
426 | |
427 auto/pathdef.c: auto/config.aap | |
532 | 428 :print Creating $target |
429 :print >! $target /* pathdef.c */ | |
430 :print >> $target /* This file is automatically created by main.aap */ | |
431 :print >> $target /* DO NOT EDIT! Change main.aap only. */ | |
432 :print >> $target $#include "vim.h" | |
433 :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC"; | |
434 :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR"; | |
435 v = $CC -c -I$srcdir $CFLAGS | |
16 | 436 @v = string.replace(v, '"', '\\"') |
532 | 437 :print >> $target char_u *all_cflags = (char_u *)"$v"; |
438 linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS | |
439 link_sed = $BDIR/link.sed | |
440 @if os.path.exists(link_sed): | |
441 # filter $linkcmd through $BDIR/link.sed | |
442 :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd | |
16 | 443 @linkcmd = string.replace(linkcmd, '"', '\\"') |
532 | 444 :print >> $target char_u *all_lflags = (char_u *)"$linkcmd"; |
445 @if _no.get("COMPILEDBY"): | |
446 who = $COMPILEDBY | |
1461 | 447 where = |
532 | 448 @else: |
449 :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who | |
7 | 450 |
532 | 451 :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where |
1461 | 452 @who = string.replace(who, '"', '\\"') |
453 @where = string.replace(where, '"', '\\"') | |
532 | 454 :print >> $target char_u *compiled_user = (char_u *)"$who"; |
455 :print >> $target char_u *compiled_sys = (char_u *)"$where"; | |
7 | 456 |
457 | |
458 ### Names of the tools that are also made | |
459 TOOLS = xxd/xxd$EXESUF | |
460 | |
461 # Root of the installation tree. Empty for a normal install, set to an | |
462 # existing path to install into a special place (for generating a package). | |
463 DESTDIR ?= | |
464 | |
796 | 465 ### Location of man pages under $MANTOPDIR |
466 MAN1DIR = /man1 | |
7 | 467 |
468 ### Location of Vim files (should not need to be changed, and | |
469 ### some things might not work when they are changed!) | |
470 VIMDIR = /vim | |
471 @r = re.compile('.*VIM_VERSION_NODOT\\s*"(vim\\d\\d[^"]*)".*', re.S) | |
472 VIMRTDIR = /`r.match(open("version.h").read()).group(1)` | |
473 HELPSUBDIR = /doc | |
474 COLSUBDIR = /colors | |
475 SYNSUBDIR = /syntax | |
476 INDSUBDIR = /indent | |
446 | 477 AUTOSUBDIR = /autoload |
7 | 478 PLUGSUBDIR = /plugin |
479 FTPLUGSUBDIR = /ftplugin | |
480 LANGSUBDIR = /lang | |
481 COMPSUBDIR = /compiler | |
482 KMAPSUBDIR = /keymap | |
483 MACROSUBDIR = /macros | |
484 TOOLSSUBDIR = /tools | |
485 TUTORSUBDIR = /tutor | |
796 | 486 SPELLSUBDIR = /spell |
7 | 487 PRINTSUBDIR = /print |
488 PODIR = po | |
489 | |
532 | 490 ### VIMLOC common root of the Vim files (all versions) |
491 ### VIMRTLOC common root of the runtime Vim files (this version) | |
492 ### VIMRCLOC compiled-in location for global [g]vimrc files (all versions) | |
7 | 493 ### VIMRUNTIMEDIR compiled-in location for runtime files (optional) |
532 | 494 ### HELPSUBLOC location for help files |
495 ### COLSUBLOC location for colorscheme files | |
496 ### SYNSUBLOC location for syntax files | |
497 ### INDSUBLOC location for indent files | |
498 ### AUTOSUBLOC location for standard autoload files | |
499 ### PLUGSUBLOC location for standard plugin files | |
7 | 500 ### FTPLUGSUBLOC location for ftplugin files |
532 | 501 ### LANGSUBLOC location for language files |
502 ### COMPSUBLOC location for compiler files | |
503 ### KMAPSUBLOC location for keymap files | |
504 ### MACROSUBLOC location for macro files | |
505 ### TOOLSSUBLOC location for tools files | |
506 ### TUTORSUBLOC location for tutor files | |
507 ### PRINTSUBLOC location for print files | |
508 ### SCRIPTLOC location for script files (menu.vim, bugreport.vim, ..) | |
7 | 509 ### You can override these if you want to install them somewhere else. |
510 ### Edit feature.h for compile-time settings. | |
532 | 511 VIMLOC = $DATADIR$VIMDIR |
796 | 512 @if not _no.get("VIMRTLOC"): |
513 VIMRTLOC = $DATADIR$VIMDIR$VIMRTDIR | |
532 | 514 VIMRCLOC = $VIMLOC |
515 HELPSUBLOC = $VIMRTLOC$HELPSUBDIR | |
516 COLSUBLOC = $VIMRTLOC$COLSUBDIR | |
517 SYNSUBLOC = $VIMRTLOC$SYNSUBDIR | |
518 INDSUBLOC = $VIMRTLOC$INDSUBDIR | |
519 AUTOSUBLOC = $VIMRTLOC$AUTOSUBDIR | |
520 PLUGSUBLOC = $VIMRTLOC$PLUGSUBDIR | |
521 FTPLUGSUBLOC = $VIMRTLOC$FTPLUGSUBDIR | |
522 LANGSUBLOC = $VIMRTLOC$LANGSUBDIR | |
523 COMPSUBLOC = $VIMRTLOC$COMPSUBDIR | |
524 KMAPSUBLOC = $VIMRTLOC$KMAPSUBDIR | |
525 MACROSUBLOC = $VIMRTLOC$MACROSUBDIR | |
526 TOOLSSUBLOC = $VIMRTLOC$TOOLSSUBDIR | |
527 TUTORSUBLOC = $VIMRTLOC$TUTORSUBDIR | |
796 | 528 SPELLSUBLOC = $VIMRTLOC$SPELLSUBDIR |
532 | 529 PRINTSUBLOC = $VIMRTLOC$PRINTSUBDIR |
530 SCRIPTLOC = $VIMRTLOC | |
7 | 531 |
532 ### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and | |
533 ### the runtime directory is not below it. | |
534 #VIMRUNTIMEDIR = $VIMRTLOC | |
535 | |
536 ### Name of the evim file target. | |
532 | 537 EVIM_FILE = $DESTDIR$SCRIPTLOC/evim.vim |
538 MSWIN_FILE = $DESTDIR$SCRIPTLOC/mswin.vim | |
7 | 539 |
540 ### Name of the menu file target. | |
532 | 541 SYS_MENU_FILE = $DESTDIR$SCRIPTLOC/menu.vim |
7 | 542 SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim |
543 SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim | |
544 | |
545 ### Name of the bugreport file target. | |
532 | 546 SYS_BUGR_FILE = $DESTDIR$SCRIPTLOC/bugreport.vim |
7 | 547 |
548 ### Name of the file type detection file target. | |
549 SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim | |
550 | |
551 ### Name of the file type detection file target. | |
532 | 552 SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim |
7 | 553 |
554 ### Name of the file type detection script file target. | |
555 SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim | |
556 | |
557 ### Name of the ftplugin-on file target. | |
558 SYS_FTPLUGIN_FILE = $DESTDIR$SCRIPTLOC/ftplugin.vim | |
559 | |
560 ### Name of the ftplugin-off file target. | |
561 SYS_FTPLUGOF_FILE = $DESTDIR$SCRIPTLOC/ftplugof.vim | |
562 | |
563 ### Name of the indent-on file target. | |
564 SYS_INDENT_FILE = $DESTDIR$SCRIPTLOC/indent.vim | |
565 | |
566 ### Name of the indent-off file target. | |
567 SYS_INDOFF_FILE = $DESTDIR$SCRIPTLOC/indoff.vim | |
568 | |
569 ### Name of the option window script file target. | |
570 SYS_OPTWIN_FILE = $DESTDIR$SCRIPTLOC/optwin.vim | |
571 | |
572 ### Permissions for binaries | |
573 BINMOD = 755 | |
574 | |
575 ### Permissions for man page | |
576 MANMOD = 644 | |
577 | |
578 ### Permissions for help files | |
579 HELPMOD = 644 | |
580 | |
581 ### Permissions for Perl and shell scripts | |
582 SCRIPTMOD = 755 | |
583 | |
584 ### Permission for Vim script files (menu.vim, bugreport.vim, ..) | |
585 VIMSCRIPTMOD = 644 | |
586 | |
587 ### Permissions for all directories that are created | |
588 DIRMOD = 755 | |
589 | |
590 ### Permissions for all other files that are created | |
591 FILEMOD = 644 | |
592 | |
593 # Where to copy the man and help files from | |
594 HELPSOURCE = ../runtime/doc | |
595 | |
596 # Where to copy the script files from (menu, bugreport) | |
597 SCRIPTSOURCE = ../runtime | |
598 | |
599 # Where to copy the colorscheme files from | |
600 COLSOURCE = ../runtime/colors | |
601 | |
602 # Where to copy the syntax files from | |
603 SYNSOURCE = ../runtime/syntax | |
604 | |
605 # Where to copy the indent files from | |
606 INDSOURCE = ../runtime/indent | |
607 | |
608 # Where to copy the standard plugin files from | |
446 | 609 AUTOSOURCE = ../runtime/autoload |
610 | |
611 # Where to copy the standard plugin files from | |
7 | 612 PLUGSOURCE = ../runtime/plugin |
613 | |
614 # Where to copy the ftplugin files from | |
615 FTPLUGSOURCE = ../runtime/ftplugin | |
616 | |
617 # Where to copy the macro files from | |
618 MACROSOURCE = ../runtime/macros | |
619 | |
620 # Where to copy the tools files from | |
621 TOOLSSOURCE = ../runtime/tools | |
622 | |
623 # Where to copy the tutor files from | |
624 TUTORSOURCE = ../runtime/tutor | |
625 | |
796 | 626 # Where to copy the spell files from |
627 SPELLSOURCE = ../runtime/spell | |
628 | |
7 | 629 # Where to look for language specific files |
630 LANGSOURCE = ../runtime/lang | |
631 | |
632 # Where to look for compiler files | |
633 COMPSOURCE = ../runtime/compiler | |
634 | |
635 # Where to look for keymap files | |
636 KMAPSOURCE = ../runtime/keymap | |
637 | |
638 # Where to look for print resource files | |
639 PRINTSOURCE = ../runtime/print | |
640 | |
641 # abbreviations | |
642 DEST_BIN = $DESTDIR$BINDIR | |
643 DEST_VIM = $DESTDIR$VIMLOC | |
644 DEST_RT = $DESTDIR$VIMRTLOC | |
645 DEST_HELP = $DESTDIR$HELPSUBLOC | |
646 DEST_COL = $DESTDIR$COLSUBLOC | |
647 DEST_SYN = $DESTDIR$SYNSUBLOC | |
648 DEST_IND = $DESTDIR$INDSUBLOC | |
446 | 649 DEST_AUTO = $DESTDIR$AUTOSUBLOC |
7 | 650 DEST_PLUG = $DESTDIR$PLUGSUBLOC |
651 DEST_FTP = $DESTDIR$FTPLUGSUBLOC | |
652 DEST_LANG = $DESTDIR$LANGSUBLOC | |
653 DEST_COMP = $DESTDIR$COMPSUBLOC | |
654 DEST_KMAP = $DESTDIR$KMAPSUBLOC | |
655 DEST_MACRO = $DESTDIR$MACROSUBLOC | |
656 DEST_TOOLS = $DESTDIR$TOOLSSUBLOC | |
657 DEST_TUTOR = $DESTDIR$TUTORSUBLOC | |
796 | 658 DEST_SPELL = $DESTDIR$SPELLSUBLOC |
7 | 659 DEST_SCRIPT = $DESTDIR$SCRIPTLOC |
660 DEST_PRINT = $DESTDIR$PRINTSUBLOC | |
796 | 661 DEST_MAN_TOP = $DESTDIR$?(MANDIR) |
662 | |
663 # We assume that the ".../man/xx/man1/" directory is for latin1 manual pages. | |
664 # Some systems use UTF-8, but these should find the ".../man/xx.UTF-8/man1/" | |
665 # directory first. | |
666 # FreeBSD uses ".../man/xx.ISO8859-1/man1" for latin1, use that one too. | |
667 DEST_MAN = $(DEST_MAN_TOP)$(MAN1DIR) | |
668 DEST_MAN_FR = $(DEST_MAN_TOP)/fr$(MAN1DIR) | |
669 DEST_MAN_FR_I = $(DEST_MAN_TOP)/fr.ISO8859-1$(MAN1DIR) | |
670 DEST_MAN_FR_U = $(DEST_MAN_TOP)/fr.UTF-8$(MAN1DIR) | |
671 DEST_MAN_IT = $(DEST_MAN_TOP)/it$(MAN1DIR) | |
672 DEST_MAN_IT_I = $(DEST_MAN_TOP)/it.ISO8859-1$(MAN1DIR) | |
673 DEST_MAN_IT_U = $(DEST_MAN_TOP)/it.UTF-8$(MAN1DIR) | |
809 | 674 DEST_MAN_PL = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR) |
675 DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR) | |
796 | 676 DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR) |
677 DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR) | |
7 | 678 |
679 # These are directories, create them when needed. | |
680 :attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL | |
827 | 681 $DEST_SYN $DEST_IND $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG |
682 $DEST_FTP $DEST_LANG | |
532 | 683 $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR |
796 | 684 $DEST_SCRIPT $DEST_PRINT $DEST_MAN $DEST_SPELL |
685 $DEST_MAN_FR $DEST_MAN_FR_I $DEST_MAN_FR_U $DEST_MAN_IT | |
809 | 686 $DEST_MAN_IT_I $DEST_MAN_IT_U |
687 $DEST_MAN_PL $DEST_MAN_PL_U | |
688 $DEST_MAN_RU $DEST_MAN_RU_U | |
7 | 689 |
690 # | |
691 # I N S T A L L | |
692 # | |
796 | 693 install: $GUI_INSTALL |
694 | |
695 install_normal: | |
7 | 696 @if not os.path.isdir(_no.DEST_BIN): |
697 @try: | |
698 :mkdir $DEST_BIN | |
699 @except: | |
700 @ pass | |
701 @if os.access(_no.DEST_BIN, os.W_OK): | |
702 # Bin directory is writable, install directly. | |
796 | 703 :update installvim installtools $INSTALL_LANGS install-icons |
7 | 704 @else: |
705 # Bin directory is not writable, need to become root. | |
532 | 706 :print The destination directory "$DEST_BIN" is not writable. |
707 :print If this is the wrong directory, use PREFIX to specify another one. | |
7 | 708 :print Otherwise, type the root password to continue installing. |
709 :asroot $AAP install | |
710 | |
796 | 711 installvim {virtual}: installvimbin installtutorbin \ |
712 installruntime installlinks installmanlinks | |
7 | 713 |
714 installvimbin {virtual}{force}: $Target $DEST_BIN | |
532 | 715 exe = $DEST_BIN/$VIMTARGET |
716 @if os.path.exists(exe): | |
717 # Move the old executable aside and delete it. Any other method | |
718 # may cause a crash if the executable is currently being used. | |
719 :move {force} $exe $(exe).rm | |
720 :del {force} $(exe).rm | |
721 :copy $VIMTARGET $DEST_BIN | |
722 :do strip $exe | |
723 :chmod $BINMOD $DEST_BIN/$VIMTARGET | |
7 | 724 # may create a link to the new executable from /usr/bin/vi |
532 | 725 @if _no.get("LINKIT"): |
726 :sys $LINKIT | |
7 | 727 |
796 | 728 # Long list of arguments for the shell script that installs the manual pages |
729 # for one language. | |
730 INSTALLMANARGS = $(VIMLOC) $(SCRIPTLOC) $(VIMRCLOC) $(HELPSOURCE) $(MANMOD) \ | |
731 $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) | |
732 | |
733 # Install most of the runtime files | |
734 installruntime {virtual}: installrtbase installmacros installtutor installspell | |
735 | |
7 | 736 # install the help files; first adjust the contents for the location |
796 | 737 installrtbase {virtual}{force}: $HELPSOURCE/vim.1 $DEST_VIM |
532 | 738 $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND |
827 | 739 $DEST_FTP $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG $DEST_TUTOR |
740 $DEST_COMP $DEST_SPELL $DEST_PRINT | |
819 | 741 :chmod 755 installman.sh |
796 | 742 :sys ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS) |
7 | 743 |
744 :cd $HELPSOURCE | |
745 @try: | |
746 XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")` | |
747 @except: | |
748 XTRA = # It's OK if there are no matches. | |
532 | 749 :copy *.txt tags $XTRA $DEST_HELP |
7 | 750 :cd - |
751 :cd $DEST_HELP | |
532 | 752 :chmod $HELPMOD *.txt tags $XTRA |
7 | 753 :cd - |
532 | 754 :copy $HELPSOURCE/*.pl $DEST_HELP |
755 :chmod $SCRIPTMOD $DEST_HELP/*.pl | |
7 | 756 # install the menu files |
532 | 757 :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE |
758 :chmod $VIMSCRIPTMOD $SYS_MENU_FILE | |
759 :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE | |
760 :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE | |
761 :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE | |
762 :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE | |
7 | 763 # install the evim file |
532 | 764 :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE |
765 :chmod $VIMSCRIPTMOD $MSWIN_FILE | |
766 :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE | |
767 :chmod $VIMSCRIPTMOD $EVIM_FILE | |
7 | 768 # install the bugreport file |
532 | 769 :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE |
770 :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE | |
7 | 771 # install the example vimrc files |
532 | 772 :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT |
773 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim | |
774 :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT | |
775 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim | |
7 | 776 # install the file type detection files |
532 | 777 :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE |
778 :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE | |
779 :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE | |
780 :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE | |
781 :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE | |
782 :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE | |
783 :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE | |
784 :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE | |
785 :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE | |
786 :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE | |
787 :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE | |
788 :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE | |
789 :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE | |
790 :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE | |
791 :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE | |
792 :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE | |
7 | 793 # install the print resource files |
532 | 794 :copy $PRINTSOURCE/*.ps $DEST_PRINT |
795 :chmod $FILEMOD $DEST_PRINT/*.ps | |
7 | 796 # install the colorscheme files |
532 | 797 :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL |
798 :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt | |
7 | 799 # install the syntax files |
532 | 800 :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN |
801 :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt | |
7 | 802 # install the indent files |
532 | 803 :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND |
804 :chmod $HELPMOD $DEST_IND/*.vim | |
446 | 805 # install the standard autoload files |
532 | 806 :copy $AUTOSOURCE/*.vim $AUTOSOURCE/README.txt $DEST_AUTO |
807 :chmod $HELPMOD $DEST_AUTO/*.vim $DEST_AUTO/README.txt | |
827 | 808 :copy $AUTOSOURCE/xml/*.vim $DEST_AUTO/xml |
809 :chmod $HELPMOD $DEST_AUTO/xml/*.vim | |
7 | 810 # install the standard plugin files |
532 | 811 :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG |
812 :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt | |
7 | 813 # install the ftplugin files |
532 | 814 :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP |
815 :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt | |
7 | 816 # install the compiler files |
532 | 817 :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP |
818 :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt | |
7 | 819 |
820 installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO | |
532 | 821 :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO |
822 # Delete any CVS and AAPDIR directories. | |
823 # Use the ":tree" command if possible. It was added later, fall back | |
824 # to using "find" when it doesn't work. | |
825 @try: | |
826 :tree $DEST_MACRO {dirname = CVS} | |
827 :del {recursive} $name | |
828 :tree $DEST_MACRO {dirname = AAPDIR} | |
829 :del {recursive} $name | |
830 :tree $DEST_MACRO {dirname = .*} | |
831 :chmod $DIRMOD $name | |
832 :tree $DEST_MACRO {filename = .*} | |
833 :chmod $FILEMOD $name | |
834 @except: | |
835 @ ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO) | |
836 @ if ok and cvsdirs: | |
837 :del {recursive} $cvsdirs | |
838 :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print`` | |
839 :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print`` | |
840 :chmod $SCRIPTMOD $DEST_MACRO/less.sh | |
7 | 841 |
842 # install the tutor files | |
796 | 843 installtutorbin {virtual}{force}: $DEST_VIM |
532 | 844 :copy vimtutor $DEST_BIN/$(VIMNAME)tutor |
845 :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor | |
796 | 846 |
847 installtutor {virtual}{force}: $DEST_RT $DEST_TUTOR | |
532 | 848 :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR |
849 :chmod $HELPMOD $DEST_TUTOR/* | |
7 | 850 |
796 | 851 # Install the spell files, if they exist. This assumes at least the English |
852 # spell file is there. | |
853 installspell {virtual}: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL) | |
854 enspl = $(SPELLSOURCE)/en.latin1.spl | |
855 @if os.path.exists(enspl): | |
856 :copy $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.vim $(DEST_SPELL) | |
857 :chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.vim | |
858 @try: | |
859 :copy $(SPELLSOURCE)/*.sug $(DEST_SPELL) | |
860 :chmod $(HELPMOD) $(DEST_SPELL)/*.sug | |
861 @except: | |
862 @ pass | |
863 | |
7 | 864 # install helper program xxd |
865 installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \ | |
796 | 866 $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS \ |
867 $INSTALL_TOOL_LANGS | |
532 | 868 xxd = $DEST_BIN/xxd$EXESUF |
869 @if os.path.exists(xxd): | |
870 :move {force} $xxd $(xxd).rm | |
871 :del $(xxd).rm | |
872 :copy xxd/xxd$EXESUF $DEST_BIN | |
873 :do strip $DEST_BIN/xxd$EXESUF | |
874 :chmod $BINMOD $DEST_BIN/xxd$EXESUF | |
819 | 875 :chmod 755 installman.sh |
796 | 876 :sys ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS) |
877 # | |
7 | 878 # install the runtime tools |
532 | 879 @try: |
880 @ if aap_has(":tree"): | |
881 # New method: copy everything and delete CVS and AAPDIR dirs | |
882 :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS | |
883 :tree $DEST_TOOLS {dirname = CVS} | |
884 :delete {recursive} $name | |
885 :tree $DEST_TOOLS {dirname = AAPDIR} | |
886 :delete {recursive} $name | |
887 @except: | |
888 # Old method: copy only specific files and directories. | |
889 :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS | |
890 :chmod $FILEMOD $DEST_TOOLS/* | |
7 | 891 # replace the path in some tools |
532 | 892 :progsearch perlpath perl |
893 @if perlpath: | |
894 :cat $TOOLSSOURCE/efm_perl.pl | | |
895 :eval re.sub("/usr/bin/perl", perlpath, stdin) | |
896 >! $DEST_TOOLS/efm_perl.pl | |
897 @else: | |
898 :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS | |
7 | 899 |
532 | 900 :progsearch awkpath nawk gawk awk |
901 @if awkpath: | |
902 :cat $TOOLSSOURCE/mve.awk | | |
903 :eval re.sub("/usr/bin/nawk", awkpath, stdin) | |
904 >! $DEST_TOOLS/mve.awk | |
905 @else: | |
906 :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS | |
7 | 907 |
532 | 908 :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*`` |
7 | 909 |
796 | 910 # install the language specific files for tools, if they were unpacked |
911 install-tool-languages: | |
819 | 912 :chmod 755 installman.sh |
796 | 913 :sys ./installman.sh xxd $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS) |
914 :sys ./installman.sh xxd $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS) | |
915 :sys ./installman.sh xxd $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS) | |
916 :sys ./installman.sh xxd $(DEST_MAN_IT) "-it" $(INSTALLMANARGS) | |
917 :sys ./installman.sh xxd $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) | |
918 :sys ./installman.sh xxd $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) | |
809 | 919 :sys ./installman.sh xxd $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) |
920 :sys ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) | |
796 | 921 :sys ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) |
922 :sys ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) | |
923 | |
7 | 924 # install the language specific files, if they were unpacked |
925 install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP | |
819 | 926 :chmod 755 installman.sh |
796 | 927 :sys ./installman.sh install $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS) |
928 :sys ./installman.sh install $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS) | |
929 :sys ./installman.sh install $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS) | |
930 :sys ./installman.sh install $(DEST_MAN_IT) "-it" $(INSTALLMANARGS) | |
931 :sys ./installman.sh install $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) | |
932 :sys ./installman.sh install $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) | |
809 | 933 :sys ./installman.sh install $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) |
934 :sys ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) | |
796 | 935 :sys ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) |
936 :sys ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) | |
819 | 937 :chmod 755 installml.sh |
796 | 938 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ |
939 $(DEST_MAN_FR) $(INSTALLMLARGS) | |
940 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
941 $(DEST_MAN_FR_I) $(INSTALLMLARGS) | |
942 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
943 $(DEST_MAN_FR_U) $(INSTALLMLARGS) | |
944 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
945 $(DEST_MAN_IT) $(INSTALLMLARGS) | |
946 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
947 $(DEST_MAN_IT_I) $(INSTALLMLARGS) | |
948 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
949 $(DEST_MAN_IT_U) $(INSTALLMLARGS) | |
950 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
809 | 951 $(DEST_MAN_PL) $(INSTALLMLARGS) |
952 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
953 $(DEST_MAN_PL_U) $(INSTALLMLARGS) | |
954 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
796 | 955 $(DEST_MAN_RU) $(INSTALLMLARGS) |
956 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ | |
957 $(DEST_MAN_RU_U) $(INSTALLMLARGS) | |
958 | |
532 | 959 @if _no.MAKEMO: |
960 :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \ | |
961 LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install | |
962 @if os.path.exists(_no.LANGSOURCE): | |
963 :print installing language files | |
964 :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG | |
965 :chmod $FILEMOD $DEST_LANG/*.vim | |
966 @if os.path.exists(_no.KMAPSOURCE): | |
967 :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP | |
968 :chmod $FILEMOD $DEST_KMAP/*.vim | |
7 | 969 |
970 # install the icons for KDE, if the directory exists and the icon doesn't. | |
971 ICON48PATH = $DESTDIR$DATADIR/icons/hicolor/48x48/apps | |
972 ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps | |
973 ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps | |
974 KDEPATH = $HOME/.kde/share/icons | |
975 install-icons {virtual}: | |
532 | 976 gp = $ICON48PATH/gvim.png |
977 @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp): | |
978 :copy $SCRIPTSOURCE/vim48x48.png $gp | |
979 gp = $ICON32PATH/gvim.png | |
980 @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp): | |
981 :copy $SCRIPTSOURCE/vim32x32.png $gp | |
982 gp = $ICON16PATH/gvim.png | |
983 @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp): | |
984 :copy $SCRIPTSOURCE/vim16x16.png $gp | |
7 | 985 |
986 | |
987 $HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE: | |
532 | 988 @if not os.path.exists(_no.TOOLSSOURCE): |
989 :print Runtime files not found. | |
990 :error You need to unpack the runtime archive before running "make install". | |
7 | 991 |
992 # create links from various names to vim. This is only done when the links | |
993 # (or executables with the same name) don't exist yet. | |
994 installlinks {virtual}: $GUI_TARGETS \ | |
532 | 995 $DEST_BIN/$EXTARGET \ |
996 $DEST_BIN/$VIEWTARGET \ | |
997 $DEST_BIN/$RVIMTARGET \ | |
998 $DEST_BIN/$RVIEWTARGET \ | |
999 $INSTALLVIMDIFF | |
7 | 1000 |
1001 installglinks {virtual}: $DEST_BIN/$GVIMTARGET \ | |
532 | 1002 $DEST_BIN/$GVIEWTARGET \ |
1003 $DEST_BIN/$RGVIMTARGET \ | |
1004 $DEST_BIN/$RGVIEWTARGET \ | |
1005 $DEST_BIN/$EVIMTARGET \ | |
1006 $DEST_BIN/$EVIEWTARGET \ | |
1007 $INSTALLGVIMDIFF | |
7 | 1008 |
1009 installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET | |
1010 installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET | |
1011 | |
1012 # These dependencies use an empty buildcheck so that they are only done when | |
1013 # the target doesn't exist. | |
1014 $DEST_BIN/$EXTARGET: {buildcheck = } | |
1015 :sys cd $DEST_BIN; ln -s $VIMTARGET $EXTARGET | |
1016 | |
1017 $DEST_BIN/$VIEWTARGET: {buildcheck = } | |
1018 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIEWTARGET | |
1019 | |
1020 $DEST_BIN/$GVIMTARGET: {buildcheck = } | |
1021 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMTARGET | |
1022 | |
1023 $DEST_BIN/$GVIEWTARGET: {buildcheck = } | |
1024 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIEWTARGET | |
1025 | |
1026 $DEST_BIN/$RVIMTARGET: {buildcheck = } | |
1027 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIMTARGET | |
1028 | |
1029 $DEST_BIN/$RVIEWTARGET: {buildcheck = } | |
1030 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIEWTARGET | |
1031 | |
1032 $DEST_BIN/$RGVIMTARGET: {buildcheck = } | |
1033 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIMTARGET | |
1034 | |
1035 $DEST_BIN/$RGVIEWTARGET: {buildcheck = } | |
1036 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIEWTARGET | |
1037 | |
1038 $DEST_BIN/$VIMDIFFTARGET: {buildcheck = } | |
1039 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIMDIFFTARGET | |
1040 | |
1041 $DEST_BIN/$GVIMDIFFTARGET: {buildcheck = } | |
1042 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMDIFFTARGET | |
1043 | |
1044 $DEST_BIN/$EVIMTARGET: {buildcheck = } | |
1045 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIMTARGET | |
1046 | |
1047 $DEST_BIN/$EVIEWTARGET: {buildcheck = } | |
1048 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET | |
1049 | |
532 | 1050 # create links for the manual pages with various names to vim. This is only |
7 | 1051 # done when the links (or manpages with the same name) don't exist yet. |
796 | 1052 INSTALLMLARGS = $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) \ |
1053 $(EXNAME) $(VIEWNAME) $(RVIMNAME) $(RVIEWNAME) \ | |
1054 $(GVIMNAME) $(GVIEWNAME) $(RGVIMNAME) $(RGVIEWNAME) \ | |
1055 $(GVIMDIFFNAME) $(EVIEWNAME) | |
7 | 1056 |
796 | 1057 installmanlinks {virtual}: |
819 | 1058 :chmod 755 installml.sh |
796 | 1059 :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ |
1060 $(DEST_MAN) $(INSTALLMLARGS) | |
7 | 1061 |
1062 # | |
1063 # U N I N S T A L L | |
1064 # | |
1065 uninstall {virtual}{force}: uninstall_runtime | |
1066 :del {force} $DEST_BIN/$VIMTARGET | |
1067 :del {force} $DEST_BIN/vimtutor | |
1068 :del {force} $DEST_BIN/$EXTARGET $DEST_BIN/$VIEWTARGET | |
1069 :del {force} $DEST_BIN/$GVIMTARGET $DEST_BIN/$GVIEWTARGET | |
1070 :del {force} $DEST_BIN/$RVIMTARGET $DEST_BIN/$RVIEWTARGET | |
1071 :del {force} $DEST_BIN/$RGVIMTARGET $DEST_BIN/$RGVIEWTARGET | |
1072 :del {force} $DEST_BIN/$VIMDIFFTARGET $DEST_BIN/$GVIMDIFFTARGET | |
1073 :del {force} $DEST_BIN/$EVIMTARGET $DEST_BIN/$EVIEWTARGET | |
796 | 1074 :del {force} $DEST_BIN/xxd$EXESUF |
7 | 1075 |
1076 # Note: "deldir" will fail if any files were added after "make install", that | |
1077 # is intentionally: Keep files the user added. | |
1078 uninstall_runtime {virtual}{force}: | |
819 | 1079 :chmod 755 installman.sh |
796 | 1080 :sys ./installman.sh uninstall $(DEST_MAN) "" $(INSTALLMANARGS) |
1081 :sys ./installman.sh uninstall $(DEST_MAN_FR) "" $(INSTALLMANARGS) | |
1082 :sys ./installman.sh uninstall $(DEST_MAN_FR_I) "" $(INSTALLMANARGS) | |
1083 :sys ./installman.sh uninstall $(DEST_MAN_FR_U) "" $(INSTALLMANARGS) | |
1084 :sys ./installman.sh uninstall $(DEST_MAN_IT) "" $(INSTALLMANARGS) | |
1085 :sys ./installman.sh uninstall $(DEST_MAN_IT_I) "" $(INSTALLMANARGS) | |
1086 :sys ./installman.sh uninstall $(DEST_MAN_IT_U) "" $(INSTALLMANARGS) | |
809 | 1087 :sys ./installman.sh uninstall $(DEST_MAN_PL) "" $(INSTALLMANARGS) |
1088 :sys ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS) | |
796 | 1089 :sys ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS) |
1090 :sys ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS) | |
819 | 1091 :chmod 755 installml.sh |
796 | 1092 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ |
1093 $(DEST_MAN) $(INSTALLMLARGS) | |
1094 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1095 $(DEST_MAN_FR) $(INSTALLMLARGS) | |
1096 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1097 $(DEST_MAN_FR_I) $(INSTALLMLARGS) | |
1098 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1099 $(DEST_MAN_FR_U) $(INSTALLMLARGS) | |
1100 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1101 $(DEST_MAN_IT) $(INSTALLMLARGS) | |
1102 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1103 $(DEST_MAN_IT_I) $(INSTALLMLARGS) | |
1104 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1105 $(DEST_MAN_IT_U) $(INSTALLMLARGS) | |
1106 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
809 | 1107 $(DEST_MAN_PL) $(INSTALLMLARGS) |
1108 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1109 $(DEST_MAN_PL_U) $(INSTALLMLARGS) | |
1110 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
796 | 1111 $(DEST_MAN_RU) $(INSTALLMLARGS) |
1112 :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ | |
1113 $(DEST_MAN_RU_U) $(INSTALLMLARGS) | |
1114 :del {force} $DEST_MAN/xxd.1 | |
1115 :del {force} $(DEST_MAN_FR)/xxd.1 $(DEST_MAN_FR_I)/xxd.1 $(DEST_MAN_FR_U)/xxd.1 | |
1116 :del {force} $(DEST_MAN_IT)/xxd.1 $(DEST_MAN_IT_I)/xxd.1 $(DEST_MAN_IT_U)/xxd.1 | |
809 | 1117 :del {force} $(DEST_MAN_PL)/xxd.1 $(DEST_MAN_PL_U)/xxd.1 |
796 | 1118 :del {force} $(DEST_MAN_RU)/xxd.1 $(DEST_MAN_RU_U)/xxd.1 |
1119 | |
7 | 1120 :del {force} $DEST_HELP/*.txt $DEST_HELP/tags $DEST_HELP/*.pl |
1121 :del {force} $SYS_MENU_FILE $SYS_SYNMENU_FILE $SYS_DELMENU_FILE | |
1122 :del {force} $SYS_BUGR_FILE $EVIM_FILE $MSWIN_FILE | |
1123 :del {force} $DEST_SCRIPT/gvimrc_example.vim $DEST_SCRIPT/vimrc_example.vim | |
1124 :del {force} $SYS_FILETYPE_FILE $SYS_FTOFF_FILE $SYS_SCRIPTS_FILE | |
1125 :del {force} $SYS_INDOFF_FILE $SYS_INDENT_FILE | |
1126 :del {force} $SYS_FTPLUGOF_FILE $SYS_FTPLUGIN_FILE | |
1127 :del {force} $SYS_OPTWIN_FILE | |
1128 :del {force} $DEST_COL/*.vim $DEST_COL/README.txt | |
1129 :del {force} $DEST_SYN/*.vim $DEST_SYN/README.txt | |
1130 :del {force} $DEST_IND/*.vim $DEST_IND/README.txt | |
1131 :del {force} $DEST_PRINT/*.ps | |
1132 :del {force}{recursive} $DEST_MACRO | |
1133 :del {force}{recursive} $DEST_TUTOR | |
796 | 1134 :del {force}{recursive} $DEST_SPELL |
7 | 1135 :del {force}{recursive} $DEST_TOOLS |
1136 :del {force}{recursive} $DEST_LANG | |
1137 :del {force}{recursive} $DEST_KMAP | |
1138 :del {force}{recursive} $DEST_COMP | |
1139 :deldir {force} $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND | |
1140 :del {force}{recursive} $DEST_FTP/*.vim $DEST_FTP/README.txt | |
827 | 1141 :del {force} $DEST_AUTO/*.vim $DEST_AUTO/README.txt $DEST_AUTO/xml/*.vim |
7 | 1142 :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt |
827 | 1143 :deldir {force} $DEST_FTP $DEST_AUTO/xml $DEST_AUTO $DEST_PLUG $DEST_PRINT $DEST_RT |
532 | 1144 # This will fail when other Vim versions are installed, no worries. |
7 | 1145 @try: |
532 | 1146 :deldir $DEST_VIM |
7 | 1147 @except: |
532 | 1148 :print Cannot delete $DEST_VIM |
7 | 1149 |
796 | 1150 ############################################################################### |
1151 ### MacOS X installation | |
1152 ### | |
1153 ### This installs a runnable Vim.app in $(prefix) | |
1154 | |
1155 REZ = /Developer/Tools/Rez | |
1156 RESDIR = $(APPDIR)/Contents/Resources | |
1157 @r = re.compile('.*VIM_VERSION_SHORT\\s*"(\\d[^"]*)".*', re.S) | |
1158 VERSION = /`r.match(open("version.h").read()).group(1)` | |
1159 | |
1160 ### Common flags | |
1161 M4FLAGSX = $?(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \ | |
1120 | 1162 -DAPP_VER=$(VERSION) |
796 | 1163 |
1120 | 1164 # Resources used for the Mac are in one directory. |
1165 RSRC_DIR = os_mac_rsrc | |
796 | 1166 |
1167 :attr {directory = $DIRMOD} $RESDIR | |
1168 | |
1169 install_macosx {virtual}: gui_bundle | |
1170 # Remove the link to the runtime dir, don't want to copy all of that. | |
1171 :delete {force} $(RESDIR)/vim/runtime | |
1172 :copy {r} $APPDIR $DESTDIR$prefix | |
1173 :tree $DESTDIR$prefix {dirname = AAPDIR} | |
1174 :delete {recursive} $name | |
1175 # Install the runtime files. Recursive! | |
1176 :mkdir {r}{f} $DESTDIR$prefix/$RESDIR/vim/runtime | |
1177 # :mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin | |
1178 :execute main.aap PREFIX=$DESTDIR$prefix/$RESDIR/vim VIMRTLOC=$DESTDIR$prefix/$RESDIR/vim/runtime installruntime | |
1179 # Put the link back. | |
1180 :symlink `os.getcwd()`/../runtime $RESDIR/vim/runtime | |
1181 # TODO: Create the vimtutor application. | |
1182 | |
1407 | 1183 gui_bundle {virtual}: $(RESDIR) bundle-dir bundle-executable bundle-info \ |
796 | 1184 bundle-resource bundle-language |
1185 | |
1186 bundle-dir {virtual}: $(APPDIR)/Contents $(VIMTARGET) | |
1187 # Make a link to the runtime directory, so that we can try out the executable | |
1188 # without installing it. | |
1189 :mkdir {r}{f} $(RESDIR)/vim | |
1190 :symlink {quiet} `os.getcwd()`/../runtime $(RESDIR)/vim/runtime | |
1191 | |
1192 bundle-executable {virtual}: $(VIMTARGET) | |
1193 :mkdir {r}{f} $(APPDIR)/Contents/MacOS | |
1194 :copy $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET) | |
1195 | |
1196 bundle-info {virtual}: bundle-dir | |
1197 :print Creating PkgInfo | |
1198 :print "APPLVIM!" >! $(APPDIR)/Contents/PkgInfo | |
1199 :print Creating Info.plist | |
1200 :sys m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist | |
1201 | |
1120 | 1202 bundle-resource {virtual}: bundle-dir bundle-rsrc |
1407 | 1203 :copy {force} $(RSRC_DIR)/*.icns $(RESDIR) |
796 | 1204 |
1205 ### Classic resources | |
1206 # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9) | |
1207 # This file is also required for OS X Vim. | |
1208 bundle-rsrc {virtual}: os_mac.rsr.hqx | |
1209 :print Creating resource fork | |
1210 :sys python dehqx.py $source | |
1211 :del {force} gui_mac.rsrc | |
1212 :move gui_mac.rsrc.rsrcfork $(RESDIR)/$(VIMNAME).rsrc | |
1213 | |
1214 # po/Make_osx.pl says something about generating a Mac message file | |
4352 | 1215 # for Ukrainian. Would somebody using Mac OS X in Ukrainian |
796 | 1216 # *really* be upset that Carbon Vim was not localised in |
4352 | 1217 # Ukrainian? |
796 | 1218 # |
1219 #bundle-language: bundle-dir po/Make_osx.pl | |
1220 # cd po && perl Make_osx.pl --outdir ../$(RESDIR) $(MULTILANG) | |
1221 bundle-language {virtual}: bundle-dir | |
1222 | |
1223 $(APPDIR)/Contents: | |
1224 :mkdir {r} $(APPDIR)/Contents/MacOS | |
1225 :mkdir {r} $(RESDIR)/English.lproj | |
1226 | |
7 | 1227 |
1228 # vim: sts=4 sw=4 : |