home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / src / main.aap < prev    next >
Encoding:
Text File  |  2003-06-01  |  32.4 KB  |  990 lines

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