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