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