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