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