blob: 564ca07fb40af7b80691ffd438585bbb563a7a68 [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
Bram Moolenaara88d9682005-03-25 21:45:43 +0000273 spell.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274 syntax.c
275 tag.c
276 term.c
277 ui.c
278 undo.c
279 window.c
280 $OS_EXTRA_SRC
281 $GUI_SRC
282 $HANGULIN_SRC
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000283 $MZSCHEME_SRC
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284 $PERL_SRC
285 $NETBEANS_SRC
286 $PYTHON_SRC
287 $TCL_SRC
288 $RUBY_SRC
289 $SNIFF_SRC
290 $WORKSHOP_SRC
291
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000292Objects =
293 $GUI_OBJ
294
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295# TODO: make is still used for subdirectories, need to write a recipe.
296MAKE ?= make
297
298all: $Target
299
300# This dependency is required to build auto/osdef.h before automatic
301# dependencies are generated.
302$Source version.c : auto/osdef.h
303
304# Need to mention that the target also depends on version.c, since it's not
305# inluded in $Source
306$Target : version.c
307
308# Some sources are to be found in the "auto" directory.
309SRCPATH += auto
310
311# When building Vim always compile version.c to get the timestamp.
312:filetype
313 declare my_prog
314:attr {filetype = my_prog} $Target
315
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000316:program $Target : $Source $Objects
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317
318:action build my_prog object
319 version_obj = `src2obj("version.c")`
320 :do compile {target = $version_obj} version.c
321 #:do build {target = $target {filetype = program}} $source $version_obj
322 link_sed = $BDIR/link.sed
323 @if os.path.exists(link_sed):
324 :move {force} $link_sed auto/link.sed
325 @else:
326 :del {force} auto/link.sed
327 :update link2.sh
328 :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \
329 -o $target $source $version_obj $LIBS" \
330 MAKE="aap" sh ./link2.sh
331 :copy {force} auto/link.sed $BDIR/link.sed
332
333# "link.sh" must be modified for A-A-P
334link2.sh : link.sh
335 :print Adjusting $-source for A-A-P.
336 :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin)
337 >! $target
338
339xxd/xxd$EXESUF: xxd/xxd.c
340 :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \
341 $MAKE -f Makefile
342
343# Build the language specific files if they were unpacked.
344# Generate the converted .mo files separately, it's no problem if this fails.
345languages {virtual}:
346 @if _no.MAKEMO:
347 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix
348 @try:
349 :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted
350 @except:
351 :print Generated converted language files failed, continuing
352
353# Update the *.po files for changes in the sources. Only run manually.
354update-po {virtual}:
355 cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po
356
357auto/if_perl.c: if_perl.xs
358 :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target
359 :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \
360 $PERLLIB/ExtUtils/typemap if_perl.xs >> $target
361
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000362$BDIR/gui_kde_wid.o: gui_kde_wid.cc
363 :sys $MOC -o gui_kde_wid_moc.cc gui_kde_wid.h
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000364 @try:
365 :sys $KDE_PREFIX/bin/dcopidl kvim_iface.h > kvim_iface.kidl
366 @except:
367 :del {f} kvim_iface.kidl
368 :sys $KDE_PREFIX/bin/dcopidl2cpp --c++-suffix cc --no-stub kvim_iface.kidl
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000369 :do compile gui_kde_wid.cc
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000370
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000371gui_kde_wid_moc.cc: $BDIR/gui_kde_wid.o
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000372
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000373kvim_iface_skel.cc: $BDIR/gui_kde_wid.o
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000374
375
Bram Moolenaar071d4272004-06-13 20:20:40 +0000376auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
377 :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh
378
379pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF
380
381auto/pathdef.c: auto/config.aap
382 :print Creating $target
383 :print >! $target /* pathdef.c */
384 :print >> $target /* This file is automatically created by main.aap */
385 :print >> $target /* DO NOT EDIT! Change main.aap only. */
386 :print >> $target $#include "vim.h"
387 :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC";
388 :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR";
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000389 v = $CC -c -I$srcdir $CFLAGS
390 @v = string.replace(v, '"', '\\"')
391 :print >> $target char_u *all_cflags = (char_u *)"$v";
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392 linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS
393 link_sed = $BDIR/link.sed
394 @if os.path.exists(link_sed):
395 # filter $linkcmd through $BDIR/link.sed
396 :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000397 @linkcmd = string.replace(linkcmd, '"', '\\"')
Bram Moolenaar071d4272004-06-13 20:20:40 +0000398 :print >> $target char_u *all_lflags = (char_u *)"$linkcmd";
399 @if _no.get("COMPILEDBY"):
400 who = $COMPILEDBY
401 where = ''
402 @else:
403 :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who
404
405 :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where
406 :print >> $target char_u *compiled_user = (char_u *)"$who";
407 :print >> $target char_u *compiled_sys = (char_u *)"$where";
408
409
410### Names of the programs and targets
411VIMTARGET = $VIMNAME$EXESUF
412EXTARGET = $EXNAME$LNKSUF
413VIEWTARGET = $VIEWNAME$LNKSUF
414GVIMNAME = g$VIMNAME
415GVIMTARGET = $GVIMNAME$LNKSUF
416GVIEWNAME = g$VIEWNAME
417GVIEWTARGET = $GVIEWNAME$LNKSUF
418RVIMNAME = r$VIMNAME
419RVIMTARGET = $RVIMNAME$LNKSUF
420RVIEWNAME = r$VIEWNAME
421RVIEWTARGET = $RVIEWNAME$LNKSUF
422RGVIMNAME = r$GVIMNAME
423RGVIMTARGET = $RGVIMNAME$LNKSUF
424RGVIEWNAME = r$GVIEWNAME
425RGVIEWTARGET = $RGVIEWNAME$LNKSUF
426VIMDIFFNAME = $(VIMNAME)diff
427GVIMDIFFNAME = g$VIMDIFFNAME
428VIMDIFFTARGET = $VIMDIFFNAME$LNKSUF
429GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF
430EVIMNAME = e$VIMNAME
431EVIMTARGET = $EVIMNAME$LNKSUF
432EVIEWNAME = e$VIEWNAME
433EVIEWTARGET = $EVIEWNAME$LNKSUF
434
435### Names of the tools that are also made
436TOOLS = xxd/xxd$EXESUF
437
438# Root of the installation tree. Empty for a normal install, set to an
439# existing path to install into a special place (for generating a package).
440DESTDIR ?=
441
442### Location of man pages
443MANSUBDIR = $MANDIR/man1
444
445### Location of Vim files (should not need to be changed, and
446### some things might not work when they are changed!)
447VIMDIR = /vim
448@r = re.compile('.*VIM_VERSION_NODOT\\s*"(vim\\d\\d[^"]*)".*', re.S)
449VIMRTDIR = /`r.match(open("version.h").read()).group(1)`
450HELPSUBDIR = /doc
451COLSUBDIR = /colors
452SYNSUBDIR = /syntax
453INDSUBDIR = /indent
454PLUGSUBDIR = /plugin
455FTPLUGSUBDIR = /ftplugin
456LANGSUBDIR = /lang
457COMPSUBDIR = /compiler
458KMAPSUBDIR = /keymap
459MACROSUBDIR = /macros
460TOOLSSUBDIR = /tools
461TUTORSUBDIR = /tutor
462PRINTSUBDIR = /print
463PODIR = po
464
465### VIMLOC common root of the Vim files (all versions)
466### VIMRTLOC common root of the runtime Vim files (this version)
467### VIMRCLOC compiled-in location for global [g]vimrc files (all versions)
468### VIMRUNTIMEDIR compiled-in location for runtime files (optional)
469### HELPSUBLOC location for help files
470### COLSUBLOC location for colorscheme files
471### SYNSUBLOC location for syntax files
472### INDSUBLOC location for indent files
473### PLUGSUBLOC location for standard plugin files
474### FTPLUGSUBLOC location for ftplugin files
475### LANGSUBLOC location for language files
476### COMPSUBLOC location for compiler files
477### KMAPSUBLOC location for keymap files
478### MACROSUBLOC location for macro files
479### TOOLSSUBLOC location for tools files
480### TUTORSUBLOC location for tutor files
481### PRINTSUBLOC location for print files
482### SCRIPTLOC location for script files (menu.vim, bugreport.vim, ..)
483### You can override these if you want to install them somewhere else.
484### Edit feature.h for compile-time settings.
485VIMLOC = $DATADIR$VIMDIR
486VIMRTLOC = $DATADIR$VIMDIR$VIMRTDIR
487VIMRCLOC = $VIMLOC
488HELPSUBLOC = $VIMRTLOC$HELPSUBDIR
489COLSUBLOC = $VIMRTLOC$COLSUBDIR
490SYNSUBLOC = $VIMRTLOC$SYNSUBDIR
491INDSUBLOC = $VIMRTLOC$INDSUBDIR
492PLUGSUBLOC = $VIMRTLOC$PLUGSUBDIR
493FTPLUGSUBLOC = $VIMRTLOC$FTPLUGSUBDIR
494LANGSUBLOC = $VIMRTLOC$LANGSUBDIR
495COMPSUBLOC = $VIMRTLOC$COMPSUBDIR
496KMAPSUBLOC = $VIMRTLOC$KMAPSUBDIR
497MACROSUBLOC = $VIMRTLOC$MACROSUBDIR
498TOOLSSUBLOC = $VIMRTLOC$TOOLSSUBDIR
499TUTORSUBLOC = $VIMRTLOC$TUTORSUBDIR
500PRINTSUBLOC = $VIMRTLOC$PRINTSUBDIR
501SCRIPTLOC = $VIMRTLOC
502
503### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and
504### the runtime directory is not below it.
505#VIMRUNTIMEDIR = $VIMRTLOC
506
507### Name of the evim file target.
508EVIM_FILE = $DESTDIR$SCRIPTLOC/evim.vim
509MSWIN_FILE = $DESTDIR$SCRIPTLOC/mswin.vim
510
511### Name of the menu file target.
512SYS_MENU_FILE = $DESTDIR$SCRIPTLOC/menu.vim
513SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim
514SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim
515
516### Name of the bugreport file target.
517SYS_BUGR_FILE = $DESTDIR$SCRIPTLOC/bugreport.vim
518
519### Name of the file type detection file target.
520SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim
521
522### Name of the file type detection file target.
523SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim
524
525### Name of the file type detection script file target.
526SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim
527
528### Name of the ftplugin-on file target.
529SYS_FTPLUGIN_FILE = $DESTDIR$SCRIPTLOC/ftplugin.vim
530
531### Name of the ftplugin-off file target.
532SYS_FTPLUGOF_FILE = $DESTDIR$SCRIPTLOC/ftplugof.vim
533
534### Name of the indent-on file target.
535SYS_INDENT_FILE = $DESTDIR$SCRIPTLOC/indent.vim
536
537### Name of the indent-off file target.
538SYS_INDOFF_FILE = $DESTDIR$SCRIPTLOC/indoff.vim
539
540### Name of the option window script file target.
541SYS_OPTWIN_FILE = $DESTDIR$SCRIPTLOC/optwin.vim
542
543### Permissions for binaries
544BINMOD = 755
545
546### Permissions for man page
547MANMOD = 644
548
549### Permissions for help files
550HELPMOD = 644
551
552### Permissions for Perl and shell scripts
553SCRIPTMOD = 755
554
555### Permission for Vim script files (menu.vim, bugreport.vim, ..)
556VIMSCRIPTMOD = 644
557
558### Permissions for all directories that are created
559DIRMOD = 755
560
561### Permissions for all other files that are created
562FILEMOD = 644
563
564# Where to copy the man and help files from
565HELPSOURCE = ../runtime/doc
566
567# Where to copy the script files from (menu, bugreport)
568SCRIPTSOURCE = ../runtime
569
570# Where to copy the colorscheme files from
571COLSOURCE = ../runtime/colors
572
573# Where to copy the syntax files from
574SYNSOURCE = ../runtime/syntax
575
576# Where to copy the indent files from
577INDSOURCE = ../runtime/indent
578
579# Where to copy the standard plugin files from
580PLUGSOURCE = ../runtime/plugin
581
582# Where to copy the ftplugin files from
583FTPLUGSOURCE = ../runtime/ftplugin
584
585# Where to copy the macro files from
586MACROSOURCE = ../runtime/macros
587
588# Where to copy the tools files from
589TOOLSSOURCE = ../runtime/tools
590
591# Where to copy the tutor files from
592TUTORSOURCE = ../runtime/tutor
593
594# Where to look for language specific files
595LANGSOURCE = ../runtime/lang
596
597# Where to look for compiler files
598COMPSOURCE = ../runtime/compiler
599
600# Where to look for keymap files
601KMAPSOURCE = ../runtime/keymap
602
603# Where to look for print resource files
604PRINTSOURCE = ../runtime/print
605
606# abbreviations
607DEST_BIN = $DESTDIR$BINDIR
608DEST_VIM = $DESTDIR$VIMLOC
609DEST_RT = $DESTDIR$VIMRTLOC
610DEST_HELP = $DESTDIR$HELPSUBLOC
611DEST_COL = $DESTDIR$COLSUBLOC
612DEST_SYN = $DESTDIR$SYNSUBLOC
613DEST_IND = $DESTDIR$INDSUBLOC
614DEST_PLUG = $DESTDIR$PLUGSUBLOC
615DEST_FTP = $DESTDIR$FTPLUGSUBLOC
616DEST_LANG = $DESTDIR$LANGSUBLOC
617DEST_COMP = $DESTDIR$COMPSUBLOC
618DEST_KMAP = $DESTDIR$KMAPSUBLOC
619DEST_MACRO = $DESTDIR$MACROSUBLOC
620DEST_TOOLS = $DESTDIR$TOOLSSUBLOC
621DEST_TUTOR = $DESTDIR$TUTORSUBLOC
622DEST_SCRIPT = $DESTDIR$SCRIPTLOC
623DEST_PRINT = $DESTDIR$PRINTSUBLOC
624DEST_MAN = $DESTDIR$MANSUBDIR
625
626# These are directories, create them when needed.
627:attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL
628 $DEST_SYN $DEST_IND $DEST_PLUG $DEST_FTP $DEST_LANG
629 $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR
630 $DEST_SCRIPT $DEST_PRINT $DEST_MAN
631
632#
633# I N S T A L L
634#
635install:
636 @if not os.path.isdir(_no.DEST_BIN):
637 @try:
638 :mkdir $DEST_BIN
639 @except:
640 @ pass
641 @if os.access(_no.DEST_BIN, os.W_OK):
642 # Bin directory is writable, install directly.
643 :update installvim installtools install-languages install-icons
644 @else:
645 # Bin directory is not writable, need to become root.
646 :print The destination directory "$DEST_BIN" is not writable.
647 :print If this is the wrong directory, use PREFIX to specify another one.
648 :print Otherwise, type the root password to continue installing.
649 :asroot $AAP install
650
651installvim {virtual}: installvimbin installruntime installlinks \
652 installhelplinks installmacros installtutor
653
654installvimbin {virtual}{force}: $Target $DEST_BIN
655 exe = $DEST_BIN/$VIMTARGET
656 @if os.path.exists(exe):
657 # Move the old executable aside and delete it. Any other method
658 # may cause a crash if the executable is currently being used.
659 :move {force} $exe $(exe).rm
660 :del {force} $(exe).rm
661 :copy $VIMTARGET $DEST_BIN
662 :do strip $exe
663 :chmod $BINMOD $DEST_BIN/$VIMTARGET
664# may create a link to the new executable from /usr/bin/vi
665 @if _no.get("LINKIT"):
666 :sys $LINKIT
667
668# install the help files; first adjust the contents for the location
669installruntime {virtual}{force}: $HELPSOURCE/vim.1 $DEST_MAN $DEST_VIM
670 $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
671 $DEST_FTP $DEST_PLUG $DEST_TUTOR $DEST_COMP $DEST_PRINT
672 :print generating $DEST_MAN/$(VIMNAME).1
673 :cat $HELPSOURCE/vim.1 |
674 :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
675 :eval re.sub(_no.VIMLOC + "/doc", _no.HELPSUBLOC, stdin) |
676 :eval re.sub(_no.VIMLOC + "/syntax", _no.SYNSUBLOC, stdin) |
677 :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin) |
678 :eval re.sub(_no.VIMLOC + "/vimrc",
679 _no.VIMRCLOC + "/vimrc", stdin) |
680 :eval re.sub(_no.VIMLOC + "/gvimrc",
681 _no.VIMRCLOC + "/gvimrc", stdin) |
682 :eval re.sub(_no.VIMLOC + "/menu.vim",
683 _no.SCRIPTLOC + "/menu.vim", stdin) |
684 :eval re.sub(_no.VIMLOC + "/bugreport.vim",
685 _no.SCRIPTLOC + "/bugreport.vim", stdin) |
686 :eval re.sub(_no.VIMLOC + "/filetype.vim",
687 _no.SCRIPTLOC + "/filetype.vim", stdin) |
688 :eval re.sub(_no.VIMLOC + "/ftoff.vim",
689 _no.SCRIPTLOC + "/ftoff.vim", stdin) |
690 :eval re.sub(_no.VIMLOC + "/scripts.vim",
691 _no.SCRIPTLOC + "/scripts.vim", stdin) |
692 :eval re.sub(_no.VIMLOC + "/optwin.vim",
693 _no.SCRIPTLOC + "/optwin.vim", stdin) |
694 :eval re.sub(_no.VIMLOC + "/\\*.ps",
695 _no.SCRIPTLOC + "/*.ps", stdin)
696 >! $DEST_MAN/$(VIMNAME).1
697 :chmod $MANMOD $DEST_MAN/$(VIMNAME).1
698
699 :print generating $DEST_MAN/$(VIMNAME)tutor.1
700 :cat $HELPSOURCE/vimtutor.1 |
701 :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
702 :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin)
703 >! $DEST_MAN/$(VIMNAME)tutor.1
704 :chmod $MANMOD $DEST_MAN/$(VIMNAME)tutor.1
705
706 :copy $HELPSOURCE/vimdiff.1 $DEST_MAN/$(VIMDIFFNAME).1
707 :chmod $MANMOD $DEST_MAN/$(VIMDIFFNAME).1
708
709 :print generating $DEST_MAN/$(EVIMNAME).1
710 :cat $HELPSOURCE/evim.1 |
711 :eval re.sub("/usr/local/lib/vim", _no.SCRIPTLOC, stdin)
712 >! $DEST_MAN/$(EVIMNAME).1
713 :chmod $MANMOD $DEST_MAN/$(EVIMNAME).1
714
715 :cd $HELPSOURCE
716 @try:
717 XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")`
718 @except:
719 XTRA = # It's OK if there are no matches.
720 :copy *.txt tags $XTRA $DEST_HELP
721 :cd -
722 :cd $DEST_HELP
723 :chmod $HELPMOD *.txt tags $XTRA
724 :cd -
725 :copy $HELPSOURCE/*.pl $DEST_HELP
726 :chmod $SCRIPTMOD $DEST_HELP/*.pl
727# install the menu files
728 :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE
729 :chmod $VIMSCRIPTMOD $SYS_MENU_FILE
730 :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE
731 :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE
732 :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE
733 :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE
734# install the evim file
735 :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE
736 :chmod $VIMSCRIPTMOD $MSWIN_FILE
737 :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE
738 :chmod $VIMSCRIPTMOD $EVIM_FILE
739# install the bugreport file
740 :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE
741 :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE
742# install the example vimrc files
743 :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT
744 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim
745 :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT
746 :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim
747# install the file type detection files
748 :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE
749 :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE
750 :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE
751 :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE
752 :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE
753 :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE
754 :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE
755 :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE
756 :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE
757 :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE
758 :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE
759 :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE
760 :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE
761 :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE
762 :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE
763 :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE
764# install the print resource files
765 :copy $PRINTSOURCE/*.ps $DEST_PRINT
766 :chmod $FILEMOD $DEST_PRINT/*.ps
767# install the colorscheme files
768 :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL
769 :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt
770# install the syntax files
771 :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN
772 :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt
773# install the indent files
774 :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND
775 :chmod $HELPMOD $DEST_IND/*.vim
776# install the standard plugin files
777 :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG
778 :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt
779# install the ftplugin files
780 :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP
781 :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt
782# install the compiler files
783 :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP
784 :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt
785
786installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO
787 :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO
788 # Delete any CVS and AAPDIR directories.
789 # Use the ":tree" command if possible. It was added later, fall back
790 # to using "find" when it doesn't work.
791 @try:
792 :tree $DEST_MACRO {dirname = CVS}
793 :del {recursive} $name
794 :tree $DEST_MACRO {dirname = AAPDIR}
795 :del {recursive} $name
796 :tree $DEST_MACRO {dirname = .*}
797 :chmod $DIRMOD $name
798 :tree $DEST_MACRO {filename = .*}
799 :chmod $FILEMOD $name
800 @except:
801 @ ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO)
802 @ if ok and cvsdirs:
803 :del {recursive} $cvsdirs
804 :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print``
805 :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print``
806 :chmod $SCRIPTMOD $DEST_MACRO/less.sh
807
808# install the tutor files
809installtutor {virtual}{force}: $TUTORSOURCE $DEST_VIM $DEST_RT $DEST_TUTOR
810 :copy vimtutor $DEST_BIN/$(VIMNAME)tutor
811 :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor
812 :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR
813 :chmod $HELPMOD $DEST_TUTOR/*
814
815# install helper program xxd
816installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \
817 $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS
818 xxd = $DEST_BIN/xxd$EXESUF
819 @if os.path.exists(xxd):
820 :move {force} $xxd $(xxd).rm
821 :del $(xxd).rm
822 :copy xxd/xxd$EXESUF $DEST_BIN
823 :do strip $DEST_BIN/xxd$EXESUF
824 :chmod $BINMOD $DEST_BIN/xxd$EXESUF
825 :copy $HELPSOURCE/xxd.1 $DEST_MAN
826 :chmod $MANMOD $DEST_MAN/xxd.1
827# install the runtime tools
828 @try:
829 @ if aap_has(":tree"):
830 # New method: copy everything and delete CVS and AAPDIR dirs
831 :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS
832 :tree $DEST_TOOLS {dirname = CVS}
833 :delete {recursive} $name
834 :tree $DEST_TOOLS {dirname = AAPDIR}
835 :delete {recursive} $name
836 @except:
837 # Old method: copy only specific files and directories.
838 :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS
839 :chmod $FILEMOD $DEST_TOOLS/*
840# replace the path in some tools
841 :progsearch perlpath perl
842 @if perlpath:
843 :cat $TOOLSSOURCE/efm_perl.pl |
844 :eval re.sub("/usr/bin/perl", perlpath, stdin)
845 >! $DEST_TOOLS/efm_perl.pl
846 @else:
847 :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS
848
849 :progsearch awkpath nawk gawk awk
850 @if awkpath:
851 :cat $TOOLSSOURCE/mve.awk |
852 :eval re.sub("/usr/bin/nawk", awkpath, stdin)
853 >! $DEST_TOOLS/mve.awk
854 @else:
855 :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS
856
857 :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*``
858
859# install the language specific files, if they were unpacked
860install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP
861 @if _no.MAKEMO:
862 :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \
863 LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install
864 @if os.path.exists(_no.LANGSOURCE):
865 :print installing language files
866 :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG
867 :chmod $FILEMOD $DEST_LANG/*.vim
868 @if os.path.exists(_no.KMAPSOURCE):
869 :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP
870 :chmod $FILEMOD $DEST_KMAP/*.vim
871
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000872# Install the icons for the KDE GUI. This differs from the KDE icons for
873# other GUIs.
874installkdeicons:
875 :copy {mkdir} ../runtime/KVim.desktop $DESTDIR$KDE_PREFIX/share/applnk/Editors/
876 :chmod 644 $DESTDIR$KDE_PREFIX/share/applnk/Editors/KVim.desktop
877 :copy {mkdir} ../runtime/kvim32x32.png $DESTDIR$KDE_PREFIX/share/icons/hicolor/32x32/apps/gvim.png
878 :chmod 644 $DESTDIR$KDE_PREFIX/share/icons/hicolor/32x32/apps/gvim.png
879 :copy {mkdir} ../runtime/kvim48x48.png $DESTDIR$KDE_PREFIX/share/icons/hicolor/48x48/apps/gvim.png
880 :chmod 644 $DESTDIR$KDE_PREFIX/share/icons/hicolor/48x48/apps/gvim.png
881 :copy {mkdir} ../runtime/hi16-action-make.png $DESTDIR$KDE_PREFIX/share/icons/hicolor/16x16/actions/hi16-action-make.png
882 :copy {mkdir} ../runtime/hi22-action-make.png $DESTDIR$KDE_PREFIX/share/icons/hicolor/22x22/actions/hi22-action-make.png
883 :copy {mkdir} ../runtime/kde-tips $DESTDIR$KDE_PREFIX/share/apps/gvim/tips
884 :chmod 644 $DESTDIR$KDE_PREFIX/share/apps/kvim/tips
885
Bram Moolenaar071d4272004-06-13 20:20:40 +0000886# install the icons for KDE, if the directory exists and the icon doesn't.
887ICON48PATH = $DESTDIR$DATADIR/icons/hicolor/48x48/apps
888ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps
889ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps
890KDEPATH = $HOME/.kde/share/icons
891install-icons {virtual}:
892 gp = $ICON48PATH/gvim.png
893 @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp):
894 :copy $SCRIPTSOURCE/vim48x48.png $gp
895 gp = $ICON32PATH/gvim.png
896 @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp):
897 :copy $SCRIPTSOURCE/vim32x32.png $gp
898 gp = $ICON16PATH/gvim.png
899 @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp):
900 :copy $SCRIPTSOURCE/vim16x16.png $gp
901
902
903$HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE:
904 @if not os.path.exists(_no.TOOLSSOURCE):
905 :print Runtime files not found.
906 :error You need to unpack the runtime archive before running "make install".
907
908# create links from various names to vim. This is only done when the links
909# (or executables with the same name) don't exist yet.
910installlinks {virtual}: $GUI_TARGETS \
911 $DEST_BIN/$EXTARGET \
912 $DEST_BIN/$VIEWTARGET \
913 $DEST_BIN/$RVIMTARGET \
914 $DEST_BIN/$RVIEWTARGET \
915 $INSTALLVIMDIFF
916
917installglinks {virtual}: $DEST_BIN/$GVIMTARGET \
918 $DEST_BIN/$GVIEWTARGET \
919 $DEST_BIN/$RGVIMTARGET \
920 $DEST_BIN/$RGVIEWTARGET \
921 $DEST_BIN/$EVIMTARGET \
922 $DEST_BIN/$EVIEWTARGET \
923 $INSTALLGVIMDIFF
924
925installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET
926installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET
927
928# These dependencies use an empty buildcheck so that they are only done when
929# the target doesn't exist.
930$DEST_BIN/$EXTARGET: {buildcheck = }
931 :sys cd $DEST_BIN; ln -s $VIMTARGET $EXTARGET
932
933$DEST_BIN/$VIEWTARGET: {buildcheck = }
934 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIEWTARGET
935
936$DEST_BIN/$GVIMTARGET: {buildcheck = }
937 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMTARGET
938
939$DEST_BIN/$GVIEWTARGET: {buildcheck = }
940 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIEWTARGET
941
942$DEST_BIN/$RVIMTARGET: {buildcheck = }
943 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIMTARGET
944
945$DEST_BIN/$RVIEWTARGET: {buildcheck = }
946 :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIEWTARGET
947
948$DEST_BIN/$RGVIMTARGET: {buildcheck = }
949 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIMTARGET
950
951$DEST_BIN/$RGVIEWTARGET: {buildcheck = }
952 :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIEWTARGET
953
954$DEST_BIN/$VIMDIFFTARGET: {buildcheck = }
955 :sys cd $DEST_BIN; ln -s $VIMTARGET $VIMDIFFTARGET
956
957$DEST_BIN/$GVIMDIFFTARGET: {buildcheck = }
958 :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMDIFFTARGET
959
960$DEST_BIN/$EVIMTARGET: {buildcheck = }
961 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIMTARGET
962
963$DEST_BIN/$EVIEWTARGET: {buildcheck = }
964 :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET
965
966# create links for the manual pages with various names to vim. This is only
967# done when the links (or manpages with the same name) don't exist yet.
968installhelplinks {virtual}: $GUI_MAN_TARGETS \
969 $DEST_MAN/$(EXNAME).1 \
970 $DEST_MAN/$(VIEWNAME).1 \
971 $DEST_MAN/$(RVIMNAME).1 \
972 $DEST_MAN/$(RVIEWNAME).1
973
974installghelplinks {virtual}: $DEST_MAN/$(GVIMNAME).1 \
975 $DEST_MAN/$(GVIEWNAME).1 \
976 $DEST_MAN/$(RGVIMNAME).1 \
977 $DEST_MAN/$(RGVIEWNAME).1 \
978 $DEST_MAN/$(GVIMDIFFNAME).1 \
979 $DEST_MAN/$(EVIEWNAME).1
980
981$DEST_MAN/$(EXNAME).1: {buildcheck = }
982 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(EXNAME).1
983
984$DEST_MAN/$(VIEWNAME).1: {buildcheck = }
985 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(VIEWNAME).1
986
987$DEST_MAN/$(GVIMNAME).1: {buildcheck = }
988 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(GVIMNAME).1
989
990$DEST_MAN/$(GVIEWNAME).1: {buildcheck = }
991 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(GVIEWNAME).1
992
993$DEST_MAN/$(RVIMNAME).1: {buildcheck = }
994 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RVIMNAME).1
995
996$DEST_MAN/$(RVIEWNAME).1: {buildcheck = }
997 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RVIEWNAME).1
998
999$DEST_MAN/$(RGVIMNAME).1: {buildcheck = }
1000 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RGVIMNAME).1
1001
1002$DEST_MAN/$(RGVIEWNAME).1: {buildcheck = }
1003 :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(RGVIEWNAME).1
1004
1005$DEST_MAN/$(GVIMDIFFNAME).1: {buildcheck = }
1006 :sys cd $DEST_MAN; ln -s $(VIMDIFFNAME).1 $(GVIMDIFFNAME).1
1007
1008$DEST_MAN/$(EVIEWNAME).1: {buildcheck = }
1009 :sys cd $DEST_MAN; ln -s $(EVIMNAME).1 $(EVIEWNAME).1
1010
1011#
1012# U N I N S T A L L
1013#
1014uninstall {virtual}{force}: uninstall_runtime
1015 :del {force} $DEST_BIN/$VIMTARGET
1016 :del {force} $DEST_MAN/$(VIMNAME).1 $DEST_MAN/$(VIMNAME)tutor.1
1017 :del {force} $DEST_BIN/vimtutor
1018 :del {force} $DEST_BIN/xxd$EXESUF $DEST_MAN/xxd.1
1019 :del {force} $DEST_BIN/$EXTARGET $DEST_BIN/$VIEWTARGET
1020 :del {force} $DEST_BIN/$GVIMTARGET $DEST_BIN/$GVIEWTARGET
1021 :del {force} $DEST_BIN/$RVIMTARGET $DEST_BIN/$RVIEWTARGET
1022 :del {force} $DEST_BIN/$RGVIMTARGET $DEST_BIN/$RGVIEWTARGET
1023 :del {force} $DEST_BIN/$VIMDIFFTARGET $DEST_BIN/$GVIMDIFFTARGET
1024 :del {force} $DEST_BIN/$EVIMTARGET $DEST_BIN/$EVIEWTARGET
1025 :del {force} $DEST_MAN/$(EXNAME).1 $DEST_MAN/$(VIEWNAME).1
1026 :del {force} $DEST_MAN/$(GVIMNAME).1 $DEST_MAN/$(GVIEWNAME).1
1027 :del {force} $DEST_MAN/$(RVIMNAME).1 $DEST_MAN/$(RVIEWNAME).1
1028 :del {force} $DEST_MAN/$(RGVIMNAME).1 $DEST_MAN/$(RGVIEWNAME).1
1029 :del {force} $DEST_MAN/$(VIMDIFFNAME).1 $DEST_MAN/$(GVIMDIFFNAME).1
1030 :del {force} $DEST_MAN/$(EVIMNAME).1 $DEST_MAN/$(EVIEWNAME).1
1031
1032# Note: "deldir" will fail if any files were added after "make install", that
1033# is intentionally: Keep files the user added.
1034uninstall_runtime {virtual}{force}:
1035 :del {force} $DEST_HELP/*.txt $DEST_HELP/tags $DEST_HELP/*.pl
1036 :del {force} $SYS_MENU_FILE $SYS_SYNMENU_FILE $SYS_DELMENU_FILE
1037 :del {force} $SYS_BUGR_FILE $EVIM_FILE $MSWIN_FILE
1038 :del {force} $DEST_SCRIPT/gvimrc_example.vim $DEST_SCRIPT/vimrc_example.vim
1039 :del {force} $SYS_FILETYPE_FILE $SYS_FTOFF_FILE $SYS_SCRIPTS_FILE
1040 :del {force} $SYS_INDOFF_FILE $SYS_INDENT_FILE
1041 :del {force} $SYS_FTPLUGOF_FILE $SYS_FTPLUGIN_FILE
1042 :del {force} $SYS_OPTWIN_FILE
1043 :del {force} $DEST_COL/*.vim $DEST_COL/README.txt
1044 :del {force} $DEST_SYN/*.vim $DEST_SYN/README.txt
1045 :del {force} $DEST_IND/*.vim $DEST_IND/README.txt
1046 :del {force} $DEST_PRINT/*.ps
1047 :del {force}{recursive} $DEST_MACRO
1048 :del {force}{recursive} $DEST_TUTOR
1049 :del {force}{recursive} $DEST_TOOLS
1050 :del {force}{recursive} $DEST_LANG
1051 :del {force}{recursive} $DEST_KMAP
1052 :del {force}{recursive} $DEST_COMP
1053 :deldir {force} $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
1054 :del {force}{recursive} $DEST_FTP/*.vim $DEST_FTP/README.txt
1055 :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt
1056 :deldir {force} $DEST_FTP $DEST_PLUG $DEST_PRINT $DEST_RT
1057# This will fail when other Vim versions are installed, no worries.
1058 @try:
1059 :deldir $DEST_VIM
1060 @except:
1061 :print Cannot delete $DEST_VIM
1062
1063
1064# vim: sts=4 sw=4 :