Mercurial > vim
comparison src/main.aap @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 3ba373b54370 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
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: | |
9 # PREFIX=dir Overrules the install directory. | |
10 # Can be specified when installing only. | |
11 # Example: aap install PREFIX=$HOME | |
12 # | |
13 | |
14 # Skip the configure stuff when "link.sh" is executing this recipe recursively | |
15 # to build pathdef.c or not building something and auto/config.aap does exist. | |
16 @if ((_no.TARGETARG != "pathdef" and has_build_target()) | |
17 @ or not os.path.exists("auto/config.aap")): | |
18 | |
19 # | |
20 # A U T O C O N F | |
21 # | |
22 | |
23 # Run autoconf when configure.in has been changed since it was last run. | |
24 # This is skipped when the signatures in "mysign" are up-to-date. When | |
25 # there is no autoconf program skip this (the signature is often the only | |
26 # thing that's outdated) | |
27 auto/configure {signfile = mysign} : configure.in | |
28 @if not program_path("autoconf"): | |
29 :print Can't find autoconf, using existing configure script. | |
30 @else: | |
31 # Move configure aside, autoconf would overwrite it | |
32 :move {exist} configure configure.save | |
33 :sys autoconf | |
34 :cat configure | :eval re.sub('\\./config.log', 'auto/config.log', stdin) >! auto/configure | |
35 :chmod 755 auto/configure | |
36 :move configure.save configure | |
37 :del {force} auto/config.cache auto/config.status | |
38 | |
39 # Change the configure script to produce config.aap instead of config.mk. | |
40 auto/configure.aap : auto/configure | |
41 :print Adjusting auto/configure for A-A-P. | |
42 :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin) | |
43 >! auto/configure.aap | |
44 :chmod 755 auto/configure.aap | |
45 | |
46 # The configure script uses the directory where it's located, use a link. | |
47 configure.aap: {buildcheck=} | |
48 :sys ln -s auto/configure.aap configure.aap | |
49 | |
50 # Dependency: run configure.aap to update config.h and config.aap in the | |
51 # "auto" directory. | |
52 config {virtual} auto/config.h auto/config.aap : | |
53 auto/configure.aap configure.aap | |
54 config.arg config.h.in config.aap.in | |
55 :sys CONFIG_STATUS=auto/config.status | |
56 ./configure.aap `file2string("config.arg")` | |
57 --cache-file=auto/config.cache | |
58 | |
59 # Configure arguments: create an empty "config.arg" file when its missing | |
60 config.arg: | |
61 :touch {exist} config.arg | |
62 | |
63 # "auto/config.aap" contains a lot of settings, such as the name of the | |
64 # executable "Target". | |
65 # First update it, forcefully if the "reconfig" target was used. | |
66 @if _no.TARGETARG != "comment" and _no.TARGETARG != "make": | |
67 @if "reconfig" in var2list(_no.TARGETARG): | |
68 :del {force} auto/config.cache auto/config.status | |
69 :update {force} auto/config.aap | |
70 @else: | |
71 :update auto/config.aap | |
72 | |
73 # Include the recipe that autoconf generated. | |
74 :include auto/config.aap | |
75 | |
76 # A "PREFIX=dir" argument overrules the value of $prefix | |
77 @if _no.get("PREFIX"): | |
78 prefix = $PREFIX | |
79 | |
80 # Don't want "~/" in prefix. | |
81 prefix = `os.path.expanduser(prefix)` | |
82 | |
83 # | |
84 # G U I variant | |
85 # | |
86 # The GUI is selected by configure, a lot of other things depend on it. | |
87 # | |
88 :variant GUI | |
89 GTK | |
90 GUI_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c | |
91 gui_gtk_f.c | |
92 GUI_OBJ $= $BDIR/gui.o $BDIR/gui_gtk.o $BDIR/gui_gtk_x11.o | |
93 $BDIR/pty.o $BDIR/gui_gtk_f.o | |
94 GUI_DEFS = -DFEAT_GUI_GTK $NARROW_PROTO | |
95 GUI_IPATH = $GUI_INC_LOC | |
96 GUI_LIBS_DIR = $GUI_LIB_LOC | |
97 GUI_LIBS1 = | |
98 GUI_LIBS2 = $GTK_LIBNAME | |
99 GUI_TARGETS = installglinks | |
100 GUI_MAN_TARGETS = installghelplinks | |
101 GUI_TESTTARGET = gui | |
102 MOTIF | |
103 GUI_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c | |
104 GUI_OBJ $= $BDIR/gui.o $BDIR/gui_motif.o $BDIR/gui_x11.o | |
105 $BDIR/pty.o $BDIR/gui_beval.o | |
106 GUI_DEFS = -DFEAT_GUI_MOTIF $NARROW_PROTO | |
107 GUI_IPATH = $GUI_INC_LOC | |
108 GUI_LIBS_DIR = $GUI_LIB_LOC | |
109 GUI_LIBS1 = | |
110 GUI_LIBS2 = $MOTIF_LIBNAME -lXt | |
111 GUI_TARGETS = installglinks | |
112 GUI_MAN_TARGETS = installghelplinks | |
113 GUI_TESTTARGET = gui | |
114 ATHENA | |
115 # XAW_LIB et al. can be overruled to use Xaw3d widgets | |
116 XAW_LIB ?= -lXaw | |
117 GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \ | |
118 gui_at_sb.c gui_at_fs.c | |
119 GUI_OBJ $= $BDIR/gui.o $BDIR/gui_athena.o $BDIR/gui_x11.o \ | |
120 $BDIR/pty.o $BDIR/gui_beval.o \ | |
121 $BDIR/gui_at_sb.o $BDIR/gui_at_fs.o | |
122 GUI_DEFS = -DFEAT_GUI_ATHENA $NARROW_PROTO | |
123 GUI_IPATH = $GUI_INC_LOC | |
124 GUI_LIBS_DIR = $GUI_LIB_LOC | |
125 GUI_LIBS1 = $XAW_LIB | |
126 GUI_LIBS2 = -lXt | |
127 GUI_TARGETS = installglinks | |
128 GUI_MAN_TARGETS = installghelplinks | |
129 GUI_TESTTARGET = gui | |
130 NEXTAW | |
131 # XAW_LIB et al. can be overruled to use Xaw3d widgets | |
132 XAW_LIB ?= -lXaw | |
133 GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c | |
134 gui_at_fs.c | |
135 GUI_OBJ $= $BDIR/gui.o $BDIR/gui_athena.o $BDIR/gui_x11.o | |
136 $BDIR/pty.o $BDIR/gui_beval.o $BDIR/gui_at_fs.o | |
137 GUI_DEFS = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO | |
138 GUI_IPATH = $GUI_INC_LOC | |
139 GUI_LIBS_DIR = $GUI_LIB_LOC | |
140 GUI_LIBS1 = $NEXTAW_LIB | |
141 GUI_LIBS2 = -lXt | |
142 GUI_TARGETS = installglinks | |
143 GUI_MAN_TARGETS = installghelplinks | |
144 GUI_TESTTARGET = gui | |
145 BEOSGUI | |
146 GUI_SRC = gui.c gui_beos.cc pty.c | |
147 GUI_OBJ = $BDIR/gui.o $BDIR/gui_beos.o $BDIR/pty.o | |
148 GUI_DEFS = -DFEAT_GUI_BEOS | |
149 GUI_IPATH = | |
150 GUI_LIBS_DIR = | |
151 GUI_LIBS1 = -lbe -lroot | |
152 GUI_LIBS2 = | |
153 GUI_TARGETS = installglinks | |
154 GUI_MAN_TARGETS = installghelplinks | |
155 GUI_TESTTARGET = gui | |
156 PHOTONGUI | |
157 GUI_SRC = gui.c gui_photon.c pty.c | |
158 GUI_OBJ = $BDIR/gui.o $BDIR/gui_photon.o $BDIR/pty.o | |
159 GUI_DEFS = -DFEAT_GUI_PHOTON | |
160 GUI_IPATH = | |
161 GUI_LIBS_DIR = | |
162 GUI_LIBS1 = -lph -lphexlib | |
163 GUI_LIBS2 = | |
164 GUI_TARGETS = installglinks | |
165 GUI_MAN_TARGETS = installghelplinks | |
166 GUI_TESTTARGET = gui | |
167 * | |
168 GUI_SRC = | |
169 GUI_OBJ = | |
170 GUI_DEFS = | |
171 GUI_IPATH = | |
172 GUI_LIBS_DIR = | |
173 GUI_LIBS1 = | |
174 GUI_LIBS2 = | |
175 GUI_TARGETS = | |
176 GUI_MAN_TARGETS = | |
177 GUI_TESTTARGET = | |
178 | |
179 | |
180 PRE_DEFS = -Iproto -I. $DEFS $GUI_DEFS $GUI_IPATH $CPPFLAGS $?(EXTRA_IPATHS) | |
181 POST_DEFS = $X_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $?(EXTRA_DEFS) | |
182 CFLAGS = $PRE_DEFS $CONF_CFLAGS $?(PROFILE_CFLAGS) $POST_DEFS | |
183 CPPFLAGS = | |
184 | |
185 ALL_LIB_DIRS = $GUI_LIBS_DIR $X_LIBS_DIR | |
186 LDFLAGS = $ALL_LIB_DIRS $CONF_LDFLAGS | |
187 LIBS = $GUI_LIBS1 $GUI_X_LIBS $GUI_LIBS2 $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $CONF_LIBS $?(EXTRA_LIBS) $PERL_LIBS $PYTHON_LIBS $TCL_LIBS $RUBY_LIBS $?(PROFILE_LIBS) | |
188 | |
189 Target = $VIMNAME | |
190 | |
191 # reconfig target also builds Vim (reconfiguration is handled above). | |
192 reconfig {virtual}: $Target | |
193 | |
194 | |
195 # Execute the test scripts. Run these after compiling Vim, before installing. | |
196 # | |
197 # This will produce a lot of garbage on your screen, including a few error | |
198 # messages. Don't worry about that. | |
199 # If there is a real error, there will be a difference between "test.out" and | |
200 # a "test99.ok" file. | |
201 # If everything is allright, the final message will be "ALL DONE". | |
202 # | |
203 test check: | |
204 VimProg = ../$Target | |
205 :execute testdir/main.aap $GUI_TESTTARGET | |
206 | |
207 testclean {virtual}: | |
208 :del {force} testdir/*.out testdir/test.log | |
209 | |
210 | |
211 # When no fetch target exists we are not a child of the ../main.aap recipe, | |
212 # Use ../main.aap to do the fetching. | |
213 # --- If you get an error here for wrong number of arguments, you need to | |
214 # update to a newer version of A-A-P. | |
215 @if not has_target("fetch"): | |
216 fetch: | |
217 :execute ../main.aap fetch | |
218 | |
219 | |
220 # All the source files that need to be compiled. | |
221 # Some are optional and depend on configure. | |
222 # "version.c" is missing, it's always compiled (see below). | |
223 Source = | |
224 buffer.c | |
225 charset.c | |
226 diff.c | |
227 digraph.c | |
228 edit.c | |
229 eval.c | |
230 ex_cmds.c | |
231 ex_cmds2.c | |
232 ex_docmd.c | |
233 ex_eval.c | |
234 ex_getln.c | |
235 fileio.c | |
236 fold.c | |
237 getchar.c | |
238 if_cscope.c | |
239 if_xcmdsrv.c | |
240 main.c | |
241 mark.c | |
242 memfile.c | |
243 memline.c | |
244 menu.c | |
245 message.c | |
246 misc1.c | |
247 misc2.c | |
248 move.c | |
249 mbyte.c | |
250 normal.c | |
251 ops.c | |
252 option.c | |
253 os_unix.c | |
254 auto/pathdef.c | |
255 quickfix.c | |
256 regexp.c | |
257 screen.c | |
258 search.c | |
259 syntax.c | |
260 tag.c | |
261 term.c | |
262 ui.c | |
263 undo.c | |
264 window.c | |
265 $OS_EXTRA_SRC | |
266 $GUI_SRC | |
267 $HANGULIN_SRC | |
268 $PERL_SRC | |
269 $NETBEANS_SRC | |
270 $PYTHON_SRC | |
271 $TCL_SRC | |
272 $RUBY_SRC | |
273 $SNIFF_SRC | |
274 $WORKSHOP_SRC | |
275 | |
276 # TODO: make is still used for subdirectories, need to write a recipe. | |
277 MAKE ?= make | |
278 | |
279 all: $Target | |
280 | |
281 # This dependency is required to build auto/osdef.h before automatic | |
282 # dependencies are generated. | |
283 $Source version.c : auto/osdef.h | |
284 | |
285 # Need to mention that the target also depends on version.c, since it's not | |
286 # inluded in $Source | |
287 $Target : version.c | |
288 | |
289 # Some sources are to be found in the "auto" directory. | |
290 SRCPATH += auto | |
291 | |
292 # When building Vim always compile version.c to get the timestamp. | |
293 :filetype | |
294 declare my_prog | |
295 :attr {filetype = my_prog} $Target | |
296 | |
297 :program $Target : $Source | |
298 | |
299 :action build my_prog object | |
300 version_obj = `src2obj("version.c")` | |
301 :do compile {target = $version_obj} version.c | |
302 #:do build {target = $target {filetype = program}} $source $version_obj | |
303 link_sed = $BDIR/link.sed | |
304 @if os.path.exists(link_sed): | |
305 :move {force} $link_sed auto/link.sed | |
306 @else: | |
307 :del {force} auto/link.sed | |
308 :update link2.sh | |
309 :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \ | |
310 -o $target $source $version_obj $LIBS" \ | |
311 MAKE="aap" sh ./link2.sh | |
312 :copy {force} auto/link.sed $BDIR/link.sed | |
313 | |
314 # "link.sh" must be modified for A-A-P | |
315 link2.sh : link.sh | |
316 :print Adjusting $-source for A-A-P. | |
317 :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin) | |
318 >! $target | |
319 | |
320 xxd/xxd$EXESUF: xxd/xxd.c | |
321 :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \ | |
322 $MAKE -f Makefile | |
323 | |
324 # Build the language specific files if they were unpacked. | |
325 # Generate the converted .mo files separately, it's no problem if this fails. | |
326 languages {virtual}: | |
327 @if _no.MAKEMO: | |
328 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix | |
329 @try: | |
330 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted | |
331 @except: | |
332 :print Generated converted language files failed, continuing | |
333 | |
334 # Update the *.po files for changes in the sources. Only run manually. | |
335 update-po {virtual}: | |
336 cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po | |
337 | |
338 auto/if_perl.c: if_perl.xs | |
339 :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target | |
340 :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \ | |
341 $PERLLIB/ExtUtils/typemap if_perl.xs >> $target | |
342 | |
343 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in | |
344 :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh | |
345 | |
346 pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF | |
347 | |
348 auto/pathdef.c: auto/config.aap | |
349 :print Creating $target | |
350 :print >! $target /* pathdef.c */ | |
351 :print >> $target /* This file is automatically created by main.aap */ | |
352 :print >> $target /* DO NOT EDIT! Change main.aap only. */ | |
353 :print >> $target $#include "vim.h" | |
354 :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC"; | |
355 :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR"; | |
356 :print >> $target char_u *all_cflags = (char_u *)"$CC -c -I$srcdir $CFLAGS"; | |
357 linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS | |
358 link_sed = $BDIR/link.sed | |
359 @if os.path.exists(link_sed): | |
360 # filter $linkcmd through $BDIR/link.sed | |
361 :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd | |
362 :print >> $target char_u *all_lflags = (char_u *)"$linkcmd"; | |
363 @if _no.get("COMPILEDBY"): | |
364 who = $COMPILEDBY | |
365 where = '' | |
366 @else: | |
367 :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who | |
368 | |
369 :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where | |
370 :print >> $target char_u *compiled_user = (char_u *)"$who"; | |
371 :print >> $target char_u *compiled_sys = (char_u *)"$where"; | |
372 | |
373 | |
374 ### Names of the programs and targets | |
375 VIMTARGET = $VIMNAME$EXESUF | |
376 EXTARGET = $EXNAME$LNKSUF | |
377 VIEWTARGET = $VIEWNAME$LNKSUF | |
378 GVIMNAME = g$VIMNAME | |
379 GVIMTARGET = $GVIMNAME$LNKSUF | |
380 GVIEWNAME = g$VIEWNAME | |
381 GVIEWTARGET = $GVIEWNAME$LNKSUF | |
382 RVIMNAME = r$VIMNAME | |
383 RVIMTARGET = $RVIMNAME$LNKSUF | |
384 RVIEWNAME = r$VIEWNAME | |
385 RVIEWTARGET = $RVIEWNAME$LNKSUF | |
386 RGVIMNAME = r$GVIMNAME | |
387 RGVIMTARGET = $RGVIMNAME$LNKSUF | |
388 RGVIEWNAME = r$GVIEWNAME | |
389 RGVIEWTARGET = $RGVIEWNAME$LNKSUF | |
390 VIMDIFFNAME = $(VIMNAME)diff | |
391 GVIMDIFFNAME = g$VIMDIFFNAME | |
392 VIMDIFFTARGET = $VIMDIFFNAME$LNKSUF | |
393 GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF | |
394 EVIMNAME = e$VIMNAME | |
395 EVIMTARGET = $EVIMNAME$LNKSUF | |
396 EVIEWNAME = e$VIEWNAME | |
397 EVIEWTARGET = $EVIEWNAME$LNKSUF | |
398 | |
399 ### Names of the tools that are also made | |
400 TOOLS = xxd/xxd$EXESUF | |
401 | |
402 # Root of the installation tree. Empty for a normal install, set to an | |
403 # existing path to install into a special place (for generating a package). | |
404 DESTDIR ?= | |
405 | |
406 ### Location of man pages | |
407 MANSUBDIR = $MANDIR/man1 | |
408 | |
409 ### Location of Vim files (should not need to be changed, and | |
410 ### some things might not work when they are changed!) | |
411 VIMDIR = /vim | |
412 @r = re.compile('.*VIM_VERSION_NODOT\\s*"(vim\\d\\d[^"]*)".*', re.S) | |
413 VIMRTDIR = /`r.match(open("version.h").read()).group(1)` | |
414 HELPSUBDIR = /doc | |
415 COLSUBDIR = /colors | |
416 SYNSUBDIR = /syntax | |
417 INDSUBDIR = /indent | |
418 PLUGSUBDIR = /plugin | |
419 FTPLUGSUBDIR = /ftplugin | |
420 LANGSUBDIR = /lang | |
421 COMPSUBDIR = /compiler | |
422 KMAPSUBDIR = /keymap | |
423 MACROSUBDIR = /macros | |
424 TOOLSSUBDIR = /tools | |
425 TUTORSUBDIR = /tutor | |
426 PRINTSUBDIR = /print | |
427 PODIR = po | |
428 | |
429 ### VIMLOC common root of the Vim files (all versions) | |
430 ### VIMRTLOC common root of the runtime Vim files (this version) | |
431 ### VIMRCLOC compiled-in location for global [g]vimrc files (all versions) | |
432 ### VIMRUNTIMEDIR compiled-in location for runtime files (optional) | |
433 ### HELPSUBLOC location for help files | |
434 ### COLSUBLOC location for colorscheme files | |
435 ### SYNSUBLOC location for syntax files | |
436 ### INDSUBLOC location for indent files | |
437 ### PLUGSUBLOC location for standard plugin files | |
438 ### FTPLUGSUBLOC location for ftplugin files | |
439 ### LANGSUBLOC location for language files | |
440 ### COMPSUBLOC location for compiler files | |
441 ### KMAPSUBLOC location for keymap files | |
442 ### MACROSUBLOC location for macro files | |
443 ### TOOLSSUBLOC location for tools files | |
444 ### TUTORSUBLOC location for tutor files | |
445 ### PRINTSUBLOC location for print files | |
446 ### SCRIPTLOC location for script files (menu.vim, bugreport.vim, ..) | |
447 ### You can override these if you want to install them somewhere else. | |
448 ### Edit feature.h for compile-time settings. | |
449 VIMLOC = $DATADIR$VIMDIR | |
450 VIMRTLOC = $DATADIR$VIMDIR$VIMRTDIR | |
451 VIMRCLOC = $VIMLOC | |
452 HELPSUBLOC = $VIMRTLOC$HELPSUBDIR | |
453 COLSUBLOC = $VIMRTLOC$COLSUBDIR | |
454 SYNSUBLOC = $VIMRTLOC$SYNSUBDIR | |
455 INDSUBLOC = $VIMRTLOC$INDSUBDIR | |
456 PLUGSUBLOC = $VIMRTLOC$PLUGSUBDIR | |
457 FTPLUGSUBLOC = $VIMRTLOC$FTPLUGSUBDIR | |
458 LANGSUBLOC = $VIMRTLOC$LANGSUBDIR | |
459 COMPSUBLOC = $VIMRTLOC$COMPSUBDIR | |
460 KMAPSUBLOC = $VIMRTLOC$KMAPSUBDIR | |
461 MACROSUBLOC = $VIMRTLOC$MACROSUBDIR | |
462 TOOLSSUBLOC = $VIMRTLOC$TOOLSSUBDIR | |
463 TUTORSUBLOC = $VIMRTLOC$TUTORSUBDIR | |
464 PRINTSUBLOC = $VIMRTLOC$PRINTSUBDIR | |
465 SCRIPTLOC = $VIMRTLOC | |
466 | |
467 ### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and | |
468 ### the runtime directory is not below it. | |
469 #VIMRUNTIMEDIR = $VIMRTLOC | |
470 | |
471 ### Name of the evim file target. | |
472 EVIM_FILE = $DESTDIR$SCRIPTLOC/evim.vim | |
473 MSWIN_FILE = $DESTDIR$SCRIPTLOC/mswin.vim | |
474 | |
475 ### Name of the menu file target. | |
476 SYS_MENU_FILE = $DESTDIR$SCRIPTLOC/menu.vim | |
477 SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim | |
478 SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim | |
479 | |
480 ### Name of the bugreport file target. | |
481 SYS_BUGR_FILE = $DESTDIR$SCRIPTLOC/bugreport.vim | |
482 | |
483 ### Name of the file type detection file target. | |
484 SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim | |
485 | |
486 ### Name of the file type detection file target. | |
487 SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim | |
488 | |
489 ### Name of the file type detection script file target. | |
490 SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim | |
491 | |
492 ### Name of the ftplugin-on file target. | |
493 SYS_FTPLUGIN_FILE = $DESTDIR$SCRIPTLOC/ftplugin.vim | |
494 | |
495 ### Name of the ftplugin-off file target. | |
496 SYS_FTPLUGOF_FILE = $DESTDIR$SCRIPTLOC/ftplugof.vim | |
497 | |
498 ### Name of the indent-on file target. | |
499 SYS_INDENT_FILE = $DESTDIR$SCRIPTLOC/indent.vim | |
500 | |
501 ### Name of the indent-off file target. | |
502 SYS_INDOFF_FILE = $DESTDIR$SCRIPTLOC/indoff.vim | |
503 | |
504 ### Name of the option window script file target. | |
505 SYS_OPTWIN_FILE = $DESTDIR$SCRIPTLOC/optwin.vim | |
506 | |
507 ### Permissions for binaries | |
508 BINMOD = 755 | |
509 | |
510 ### Permissions for man page | |
511 MANMOD = 644 | |
512 | |
513 ### Permissions for help files | |
514 HELPMOD = 644 | |
515 | |
516 ### Permissions for Perl and shell scripts | |
517 SCRIPTMOD = 755 | |
518 | |
519 ### Permission for Vim script files (menu.vim, bugreport.vim, ..) | |
520 VIMSCRIPTMOD = 644 | |
521 | |
522 ### Permissions for all directories that are created | |
523 DIRMOD = 755 | |
524 | |
525 ### Permissions for all other files that are created | |
526 FILEMOD = 644 | |
527 | |
528 # Where to copy the man and help files from | |
529 HELPSOURCE = ../runtime/doc | |
530 | |
531 # Where to copy the script files from (menu, bugreport) | |
532 SCRIPTSOURCE = ../runtime | |
533 | |
534 # Where to copy the colorscheme files from | |
535 COLSOURCE = ../runtime/colors | |
536 | |
537 # Where to copy the syntax files from | |
538 SYNSOURCE = ../runtime/syntax | |
539 | |
540 # Where to copy the indent files from | |
541 INDSOURCE = ../runtime/indent | |
542 | |
543 # Where to copy the standard plugin files from | |
544 PLUGSOURCE = ../runtime/plugin | |
545 | |
546 # Where to copy the ftplugin files from | |
547 FTPLUGSOURCE = ../runtime/ftplugin | |
548 | |
549 # Where to copy the macro files from | |
550 MACROSOURCE = ../runtime/macros | |
551 | |
552 # Where to copy the tools files from | |
553 TOOLSSOURCE = ../runtime/tools | |
554 | |
555 # Where to copy the tutor files from | |
556 TUTORSOURCE = ../runtime/tutor | |
557 | |
558 # Where to look for language specific files | |
559 LANGSOURCE = ../runtime/lang | |
560 | |
561 # Where to look for compiler files | |
562 COMPSOURCE = ../runtime/compiler | |
563 | |
564 # Where to look for keymap files | |
565 KMAPSOURCE = ../runtime/keymap | |
566 | |
567 # Where to look for print resource files | |
568 PRINTSOURCE = ../runtime/print | |
569 | |
570 # abbreviations | |
571 DEST_BIN = $DESTDIR$BINDIR | |
572 DEST_VIM = $DESTDIR$VIMLOC | |
573 DEST_RT = $DESTDIR$VIMRTLOC | |
574 DEST_HELP = $DESTDIR$HELPSUBLOC | |
575 DEST_COL = $DESTDIR$COLSUBLOC | |
576 DEST_SYN = $DESTDIR$SYNSUBLOC | |
577 DEST_IND = $DESTDIR$INDSUBLOC | |
578 DEST_PLUG = $DESTDIR$PLUGSUBLOC | |
579 DEST_FTP = $DESTDIR$FTPLUGSUBLOC | |
580 DEST_LANG = $DESTDIR$LANGSUBLOC | |
581 DEST_COMP = $DESTDIR$COMPSUBLOC | |
582 DEST_KMAP = $DESTDIR$KMAPSUBLOC | |
583 DEST_MACRO = $DESTDIR$MACROSUBLOC | |
584 DEST_TOOLS = $DESTDIR$TOOLSSUBLOC | |
585 DEST_TUTOR = $DESTDIR$TUTORSUBLOC | |
586 DEST_SCRIPT = $DESTDIR$SCRIPTLOC | |
587 DEST_PRINT = $DESTDIR$PRINTSUBLOC | |
588 DEST_MAN = $DESTDIR$MANSUBDIR | |
589 | |
590 # These are directories, create them when needed. | |
591 :attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL | |
592 $DEST_SYN $DEST_IND $DEST_PLUG $DEST_FTP $DEST_LANG | |
593 $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR | |
594 $DEST_SCRIPT $DEST_PRINT $DEST_MAN | |
595 | |
596 # | |
597 # I N S T A L L | |
598 # | |
599 install: | |
600 @if not os.path.isdir(_no.DEST_BIN): | |
601 @try: | |
602 :mkdir $DEST_BIN | |
603 @except: | |
604 @ pass | |
605 @if os.access(_no.DEST_BIN, os.W_OK): | |
606 # Bin directory is writable, install directly. | |
607 :update installvim installtools install-languages install-icons | |
608 @else: | |
609 # Bin directory is not writable, need to become root. | |
610 :print The destination directory "$DEST_BIN" is not writable. | |
611 :print If this is the wrong directory, use PREFIX to specify another one. | |
612 :print Otherwise, type the root password to continue installing. | |
613 :asroot $AAP install | |
614 | |
615 installvim {virtual}: installvimbin installruntime installlinks \ | |
616 installhelplinks installmacros installtutor | |
617 | |
618 installvimbin {virtual}{force}: $Target $DEST_BIN | |
619 exe = $DEST_BIN/$VIMTARGET | |
620 @if os.path.exists(exe): | |
621 # Move the old executable aside and delete it. Any other method | |
622 # may cause a crash if the executable is currently being used. | |
623 :move {force} $exe $(exe).rm | |
624 :del {force} $(exe).rm | |
625 :copy $VIMTARGET $DEST_BIN | |
626 :do strip $exe | |
627 :chmod $BINMOD $DEST_BIN/$VIMTARGET | |
628 # may create a link to the new executable from /usr/bin/vi | |
629 @if _no.get("LINKIT"): | |
630 :sys $LINKIT | |
631 | |
632 # install the help files; first adjust the contents for the location | |
633 installruntime {virtual}{force}: $HELPSOURCE/vim.1 $DEST_MAN $DEST_VIM | |
634 $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND | |
635 $DEST_FTP $DEST_PLUG $DEST_TUTOR $DEST_COMP $DEST_PRINT | |
636 :print generating $DEST_MAN/$(VIMNAME).1 | |
637 :cat $HELPSOURCE/vim.1 | | |
638 :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) | | |
639 :eval re.sub(_no.VIMLOC + "/doc", _no.HELPSUBLOC, stdin) | | |
640 :eval re.sub(_no.VIMLOC + "/syntax", _no.SYNSUBLOC, stdin) | | |
641 :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin) | | |
642 :eval re.sub(_no.VIMLOC + "/vimrc", | |
643 _no.VIMRCLOC + "/vimrc", stdin) | | |
644 :eval re.sub(_no.VIMLOC + "/gvimrc", | |
645 _no.VIMRCLOC + "/gvimrc", stdin) | | |
646 :eval re.sub(_no.VIMLOC + "/menu.vim", | |
647 _no.SCRIPTLOC + "/menu.vim", stdin) | | |
648 :eval re.sub(_no.VIMLOC + "/bugreport.vim", | |
649 _no.SCRIPTLOC + "/bugreport.vim", stdin) | | |
650 :eval re.sub(_no.VIMLOC + "/filetype.vim", | |
651 _no.SCRIPTLOC + "/filetype.vim", stdin) | | |
652 :eval re.sub(_no.VIMLOC + "/ftoff.vim", | |
653 _no.SCRIPTLOC + "/ftoff.vim", stdin) | | |
654 :eval re.sub(_no.VIMLOC + "/scripts.vim", | |
655 _no.SCRIPTLOC + "/scripts.vim", stdin) | | |
656 :eval re.sub(_no.VIMLOC + "/optwin.vim", | |
657 _no.SCRIPTLOC + "/optwin.vim", stdin) | | |
658 :eval re.sub(_no.VIMLOC + "/\\*.ps", | |
659 _no.SCRIPTLOC + "/*.ps", stdin) | |
660 >! $DEST_MAN/$(VIMNAME).1 | |
661 :chmod $MANMOD $DEST_MAN/$(VIMNAME).1 | |
662 | |
663 :print generating $DEST_MAN/$(VIMNAME)tutor.1 | |
664 :cat $HELPSOURCE/vimtutor.1 | | |
665 :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) | | |
666 :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin) | |
667 >! $DEST_MAN/$(VIMNAME)tutor.1 | |
668 :chmod $MANMOD $DEST_MAN/$(VIMNAME)tutor.1 | |
669 | |
670 :copy $HELPSOURCE/vimdiff.1 $DEST_MAN/$(VIMDIFFNAME).1 | |
671 :chmod $MANMOD $DEST_MAN/$(VIMDIFFNAME).1 | |
672 | |
673 :print generating $DEST_MAN/$(EVIMNAME).1 | |
674 :cat $HELPSOURCE/evim.1 | | |
675 :eval re.sub("/usr/local/lib/vim", _no.SCRIPTLOC, stdin) | |
676 >! $DEST_MAN/$(EVIMNAME).1 | |
677 :chmod $MANMOD $DEST_MAN/$(EVIMNAME).1 | |
678 | |
679 :cd $HELPSOURCE | |
680 @try: | |
681 XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")` | |
682 @except: | |
683 XTRA = # It's OK if there are no matches. | |
684 :copy *.txt tags $XTRA $DEST_HELP | |
685 :cd - | |
686 :cd $DEST_HELP | |
687 :chmod $HELPMOD *.txt tags $XTRA | |
688 :cd - | |
689 :copy $HELPSOURCE/*.pl $DEST_HELP | |
690 :chmod $SCRIPTMOD $DEST_HELP/*.pl | |
691 # install the menu files | |
692 :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE | |
693 :chmod $VIMSCRIPTMOD $SYS_MENU_FILE | |
694 :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE | |
695 :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE | |
696 :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE | |
697 :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE | |
698 # install the evim file | |
699 :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE | |
700 :chmod $VIMSCRIPTMOD $MSWIN_FILE | |
701 :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE | |
702 :chmod $VIMSCRIPTMOD $EVIM_FILE | |
703 # install the bugreport file | |
704 :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE | |
705 :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE | |
706 # install the example vimrc files | |
707 :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT | |
708 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim | |
709 :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT | |
710 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim | |
711 # install the file type detection files | |
712 :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE | |
713 :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE | |
714 :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE | |
715 :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE | |
716 :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE | |
717 :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE | |
718 :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE | |
719 :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE | |
720 :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE | |
721 :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE | |
722 :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE | |
723 :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE | |
724 :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE | |
725 :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE | |
726 :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE | |
727 :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE | |
728 # install the print resource files | |
729 :copy $PRINTSOURCE/*.ps $DEST_PRINT | |
730 :chmod $FILEMOD $DEST_PRINT/*.ps | |
731 # install the colorscheme files | |
732 :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL | |
733 :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt | |
734 # install the syntax files | |
735 :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN | |
736 :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt | |
737 # install the indent files | |
738 :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND | |
739 :chmod $HELPMOD $DEST_IND/*.vim | |
740 # install the standard plugin files | |
741 :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG | |
742 :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt | |
743 # install the ftplugin files | |
744 :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP | |
745 :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt | |
746 # install the compiler files | |
747 :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP | |
748 :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt | |
749 | |
750 installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO | |
751 :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO | |
752 # Delete any CVS and AAPDIR directories. | |
753 # Use the ":tree" command if possible. It was added later, fall back | |
754 # to using "find" when it doesn't work. | |
755 @try: | |
756 :tree $DEST_MACRO {dirname = CVS} | |
757 :del {recursive} $name | |
758 :tree $DEST_MACRO {dirname = AAPDIR} | |
759 :del {recursive} $name | |
760 :tree $DEST_MACRO {dirname = .*} | |
761 :chmod $DIRMOD $name | |
762 :tree $DEST_MACRO {filename = .*} | |
763 :chmod $FILEMOD $name | |
764 @except: | |
765 @ ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO) | |
766 @ if ok and cvsdirs: | |
767 :del {recursive} $cvsdirs | |
768 :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print`` | |
769 :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print`` | |
770 :chmod $SCRIPTMOD $DEST_MACRO/less.sh | |
771 | |
772 # install the tutor files | |
773 installtutor {virtual}{force}: $TUTORSOURCE $DEST_VIM $DEST_RT $DEST_TUTOR | |
774 :copy vimtutor $DEST_BIN/$(VIMNAME)tutor | |
775 :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor | |
776 :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR | |
777 :chmod $HELPMOD $DEST_TUTOR/* | |
778 | |
779 # install helper program xxd | |
780 installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \ | |
781 $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS | |
782 xxd = $DEST_BIN/xxd$EXESUF | |
783 @if os.path.exists(xxd): | |
784 :move {force} $xxd $(xxd).rm | |
785 :del $(xxd).rm | |
786 :copy xxd/xxd$EXESUF $DEST_BIN | |
787 :do strip $DEST_BIN/xxd$EXESUF | |
788 :chmod $BINMOD $DEST_BIN/xxd$EXESUF | |
789 :copy $HELPSOURCE/xxd.1 $DEST_MAN | |
790 :chmod $MANMOD $DEST_MAN/xxd.1 | |
791 # install the runtime tools | |
792 @try: | |
793 @ if aap_has(":tree"): | |
794 # New method: copy everything and delete CVS and AAPDIR dirs | |
795 :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS | |
796 :tree $DEST_TOOLS {dirname = CVS} | |
797 :delete {recursive} $name | |
798 :tree $DEST_TOOLS {dirname = AAPDIR} | |
799 :delete {recursive} $name | |
800 @except: | |
801 # Old method: copy only specific files and directories. | |
802 :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS | |
803 :chmod $FILEMOD $DEST_TOOLS/* | |
804 # replace the path in some tools | |
805 :progsearch perlpath perl | |
806 @if perlpath: | |
807 :cat $TOOLSSOURCE/efm_perl.pl | | |
808 :eval re.sub("/usr/bin/perl", perlpath, stdin) | |
809 >! $DEST_TOOLS/efm_perl.pl | |
810 @else: | |
811 :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS | |
812 | |
813 :progsearch awkpath nawk gawk awk | |
814 @if awkpath: | |
815 :cat $TOOLSSOURCE/mve.awk | | |
816 :eval re.sub("/usr/bin/nawk", awkpath, stdin) | |
817 >! $DEST_TOOLS/mve.awk | |
818 @else: | |
819 :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS | |
820 | |
821 :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*`` | |
822 | |
823 # install the language specific files, if they were unpacked | |
824 install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP | |
825 @if _no.MAKEMO: | |
826 :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \ | |
827 LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install | |
828 @if os.path.exists(_no.LANGSOURCE): | |
829 :print installing language files | |
830 :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG | |
831 :chmod $FILEMOD $DEST_LANG/*.vim | |
832 @if os.path.exists(_no.KMAPSOURCE): | |
833 :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP | |
834 :chmod $FILEMOD $DEST_KMAP/*.vim | |
835 | |
836 # install the icons for KDE, if the directory exists and the icon doesn't. | |
837 ICON48PATH = $DESTDIR$DATADIR/icons/hicolor/48x48/apps | |
838 ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps | |
839 ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps | |
840 KDEPATH = $HOME/.kde/share/icons | |
841 install-icons {virtual}: | |
842 gp = $ICON48PATH/gvim.png | |
843 @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp): | |
844 :copy $SCRIPTSOURCE/vim48x48.png $gp | |
845 gp = $ICON32PATH/gvim.png | |
846 @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp): | |
847 :copy $SCRIPTSOURCE/vim32x32.png $gp | |
848 gp = $ICON16PATH/gvim.png | |
849 @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp): | |
850 :copy $SCRIPTSOURCE/vim16x16.png $gp | |
851 | |
852 | |
853 $HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE: | |
854 @if not os.path.exists(_no.TOOLSSOURCE): | |
855 :print Runtime files not found. | |
856 :error You need to unpack the runtime archive before running "make install". | |
857 | |
858 # create links from various names to vim. This is only done when the links | |
859 # (or executables with the same name) don't exist yet. | |
860 installlinks {virtual}: $GUI_TARGETS \ | |
861 $DEST_BIN/$EXTARGET \ | |
862 $DEST_BIN/$VIEWTARGET \ | |
863 $DEST_BIN/$RVIMTARGET \ | |
864 $DEST_BIN/$RVIEWTARGET \ | |
865 $INSTALLVIMDIFF | |
866 | |
867 installglinks {virtual}: $DEST_BIN/$GVIMTARGET \ | |
868 $DEST_BIN/$GVIEWTARGET \ | |
869 $DEST_BIN/$RGVIMTARGET \ | |
870 $DEST_BIN/$RGVIEWTARGET \ | |
871 $DEST_BIN/$EVIMTARGET \ | |
872 $DEST_BIN/$EVIEWTARGET \ | |
873 $INSTALLGVIMDIFF | |
874 | |
875 installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET | |
876 installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET | |
877 | |
878 # These dependencies use an empty buildcheck so that they are only done when | |
879 # the target doesn't exist. | |
880 $DEST_BIN/$EXTARGET: {buildcheck = } | |
881 :sys cd $DEST_BIN; ln -s $VIMTARGET $EXTARGET | |
882 | |
883 $DEST_BIN/$VIEWTARGET: {buildcheck = } | |
884 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIEWTARGET | |
885 | |
886 $DEST_BIN/$GVIMTARGET: {buildcheck = } | |
887 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMTARGET | |
888 | |
889 $DEST_BIN/$GVIEWTARGET: {buildcheck = } | |
890 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIEWTARGET | |
891 | |
892 $DEST_BIN/$RVIMTARGET: {buildcheck = } | |
893 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIMTARGET | |
894 | |
895 $DEST_BIN/$RVIEWTARGET: {buildcheck = } | |
896 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIEWTARGET | |
897 | |
898 $DEST_BIN/$RGVIMTARGET: {buildcheck = } | |
899 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIMTARGET | |
900 | |
901 $DEST_BIN/$RGVIEWTARGET: {buildcheck = } | |
902 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIEWTARGET | |
903 | |
904 $DEST_BIN/$VIMDIFFTARGET: {buildcheck = } | |
905 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIMDIFFTARGET | |
906 | |
907 $DEST_BIN/$GVIMDIFFTARGET: {buildcheck = } | |
908 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMDIFFTARGET | |
909 | |
910 $DEST_BIN/$EVIMTARGET: {buildcheck = } | |
911 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIMTARGET | |
912 | |
913 $DEST_BIN/$EVIEWTARGET: {buildcheck = } | |
914 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET | |
915 | |
916 # create links for the manual pages with various names to vim. This is only | |
917 # done when the links (or manpages with the same name) don't exist yet. | |
918 installhelplinks {virtual}: $GUI_MAN_TARGETS \ | |
919 $DEST_MAN/$(EXNAME).1 \ | |
920 $DEST_MAN/$(VIEWNAME).1 \ | |
921 $DEST_MAN/$(RVIMNAME).1 \ | |
922 $DEST_MAN/$(RVIEWNAME).1 | |
923 | |
924 installghelplinks {virtual}: $DEST_MAN/$(GVIMNAME).1 \ | |
925 $DEST_MAN/$(GVIEWNAME).1 \ | |
926 $DEST_MAN/$(RGVIMNAME).1 \ | |
927 $DEST_MAN/$(RGVIEWNAME).1 \ | |
928 $DEST_MAN/$(GVIMDIFFNAME).1 \ | |
929 $DEST_MAN/$(EVIEWNAME).1 | |
930 | |
931 $DEST_MAN/$(EXNAME).1: {buildcheck = } | |
932 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(EXNAME).1 | |
933 | |
934 $DEST_MAN/$(VIEWNAME).1: {buildcheck = } | |
935 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(VIEWNAME).1 | |
936 | |
937 $DEST_MAN/$(GVIMNAME).1: {buildcheck = } | |
938 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(GVIMNAME).1 | |
939 | |
940 $DEST_MAN/$(GVIEWNAME).1: {buildcheck = } | |
941 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(GVIEWNAME).1 | |
942 | |
943 $DEST_MAN/$(RVIMNAME).1: {buildcheck = } | |
944 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RVIMNAME).1 | |
945 | |
946 $DEST_MAN/$(RVIEWNAME).1: {buildcheck = } | |
947 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RVIEWNAME).1 | |
948 | |
949 $DEST_MAN/$(RGVIMNAME).1: {buildcheck = } | |
950 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RGVIMNAME).1 | |
951 | |
952 $DEST_MAN/$(RGVIEWNAME).1: {buildcheck = } | |
953 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RGVIEWNAME).1 | |
954 | |
955 $DEST_MAN/$(GVIMDIFFNAME).1: {buildcheck = } | |
956 :sys cd $DEST_MAN; ln -s $(VIMDIFFNAME).1 $(GVIMDIFFNAME).1 | |
957 | |
958 $DEST_MAN/$(EVIEWNAME).1: {buildcheck = } | |
959 :sys cd $DEST_MAN; ln -s $(EVIMNAME).1 $(EVIEWNAME).1 | |
960 | |
961 # | |
962 # U N I N S T A L L | |
963 # | |
964 uninstall {virtual}{force}: uninstall_runtime | |
965 :del {force} $DEST_BIN/$VIMTARGET | |
966 :del {force} $DEST_MAN/$(VIMNAME).1 $DEST_MAN/$(VIMNAME)tutor.1 | |
967 :del {force} $DEST_BIN/vimtutor | |
968 :del {force} $DEST_BIN/xxd$EXESUF $DEST_MAN/xxd.1 | |
969 :del {force} $DEST_BIN/$EXTARGET $DEST_BIN/$VIEWTARGET | |
970 :del {force} $DEST_BIN/$GVIMTARGET $DEST_BIN/$GVIEWTARGET | |
971 :del {force} $DEST_BIN/$RVIMTARGET $DEST_BIN/$RVIEWTARGET | |
972 :del {force} $DEST_BIN/$RGVIMTARGET $DEST_BIN/$RGVIEWTARGET | |
973 :del {force} $DEST_BIN/$VIMDIFFTARGET $DEST_BIN/$GVIMDIFFTARGET | |
974 :del {force} $DEST_BIN/$EVIMTARGET $DEST_BIN/$EVIEWTARGET | |
975 :del {force} $DEST_MAN/$(EXNAME).1 $DEST_MAN/$(VIEWNAME).1 | |
976 :del {force} $DEST_MAN/$(GVIMNAME).1 $DEST_MAN/$(GVIEWNAME).1 | |
977 :del {force} $DEST_MAN/$(RVIMNAME).1 $DEST_MAN/$(RVIEWNAME).1 | |
978 :del {force} $DEST_MAN/$(RGVIMNAME).1 $DEST_MAN/$(RGVIEWNAME).1 | |
979 :del {force} $DEST_MAN/$(VIMDIFFNAME).1 $DEST_MAN/$(GVIMDIFFNAME).1 | |
980 :del {force} $DEST_MAN/$(EVIMNAME).1 $DEST_MAN/$(EVIEWNAME).1 | |
981 | |
982 # Note: "deldir" will fail if any files were added after "make install", that | |
983 # is intentionally: Keep files the user added. | |
984 uninstall_runtime {virtual}{force}: | |
985 :del {force} $DEST_HELP/*.txt $DEST_HELP/tags $DEST_HELP/*.pl | |
986 :del {force} $SYS_MENU_FILE $SYS_SYNMENU_FILE $SYS_DELMENU_FILE | |
987 :del {force} $SYS_BUGR_FILE $EVIM_FILE $MSWIN_FILE | |
988 :del {force} $DEST_SCRIPT/gvimrc_example.vim $DEST_SCRIPT/vimrc_example.vim | |
989 :del {force} $SYS_FILETYPE_FILE $SYS_FTOFF_FILE $SYS_SCRIPTS_FILE | |
990 :del {force} $SYS_INDOFF_FILE $SYS_INDENT_FILE | |
991 :del {force} $SYS_FTPLUGOF_FILE $SYS_FTPLUGIN_FILE | |
992 :del {force} $SYS_OPTWIN_FILE | |
993 :del {force} $DEST_COL/*.vim $DEST_COL/README.txt | |
994 :del {force} $DEST_SYN/*.vim $DEST_SYN/README.txt | |
995 :del {force} $DEST_IND/*.vim $DEST_IND/README.txt | |
996 :del {force} $DEST_PRINT/*.ps | |
997 :del {force}{recursive} $DEST_MACRO | |
998 :del {force}{recursive} $DEST_TUTOR | |
999 :del {force}{recursive} $DEST_TOOLS | |
1000 :del {force}{recursive} $DEST_LANG | |
1001 :del {force}{recursive} $DEST_KMAP | |
1002 :del {force}{recursive} $DEST_COMP | |
1003 :deldir {force} $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND | |
1004 :del {force}{recursive} $DEST_FTP/*.vim $DEST_FTP/README.txt | |
1005 :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt | |
1006 :deldir {force} $DEST_FTP $DEST_PLUG $DEST_PRINT $DEST_RT | |
1007 # This will fail when other Vim versions are installed, no worries. | |
1008 @try: | |
1009 :deldir $DEST_VIM | |
1010 @except: | |
1011 :print Cannot delete $DEST_VIM | |
1012 | |
1013 | |
1014 # vim: sts=4 sw=4 : |