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