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