home *** CD-ROM | disk | FTP | other *** search
/ Dream 54 / Amiga_Dream_54.iso / OS2 / elvis-2.1i-os2.tar.gz / elvis-2.1i-os2.tar / INSTALL < prev    next >
Text File  |  1998-03-08  |  13KB  |  294 lines

  1. HOW TO COMPILE & INSTALL ELVIS 2.1i
  2.  
  3. Separate sets of instructions are provided below for UNIX, Windows-NT,
  4. MS-DOS, and OS/2.
  5.  
  6. For Win32 and MS-DOS, I've constructed batch files which, when run, cause
  7. the programs to be compiled.  This is the preferred way to compile elvis
  8. and its related programs.  However, you can also use MSVC++'s interactive
  9. development environment if you prefer.  Separate instructions are given
  10. for both compilation methods, for both operating systems.
  11.  
  12. All of these instructions assume that you have already unpacked the files
  13. from the source code archive, "elvis-2.1i.tar.gz".  That's a gzipped tar
  14. archive.  If you don't have the gzip and tar utilities, then the easiest
  15. way for you to unpack them is to compile the "untar.c" program (available
  16. via anonymous FTP from ftp://ftp.cs.pdx.edu/pub/elvis/untar.c).  The files
  17. will be placed in a subdirectory named "elvis-2.1i".  The MS-DOS *.MAK files
  18. assume that you've unpacked them while in C:\MSVC, so the files themselves
  19. should end up in C:\MSVC\elvis-2.1i.
  20.  
  21. ================================================================================
  22.  
  23. UNIX
  24.      1) Run the "configure" shell script to create "Makefile" and "config.h"
  25.     files.  I tried to make this "configure" script work about the same
  26.     as GNU ones.  For a complete list of options, run "configure -?"
  27.     Here's a list of some of the more important ones, but YOU PROBABLY
  28.     DON'T NEED TO USE ANY OF THEM because the defaults are pretty smart.
  29.     
  30.         --with-x[=no]
  31.             This forces elvis to include support for X-windows, or
  32.             (with "=no") forces it not to support X-windows.  If you
  33.             omit this flag, configure will automatically detect
  34.             whether X is installed on your system, and use it if
  35.             available.
  36.  
  37.         --without-x
  38.             This is a synonym for "--with-x=no".
  39.  
  40.         --x-includes=directory
  41.             configure has a built-in list of likely places where
  42.             X-windows header files might be installed.  This argument
  43.             adds another possible location to the list.  The list is
  44.             used for the automatic inspection if "--with-x[=no]" was
  45.             omitted, and the actual directory where the files were
  46.             found are incorporated into the Makefile.
  47.  
  48.             The X-windows header files are actually expected to
  49.             reside in a subdirectory named "X11" under the given
  50.             directory.  For example, if your system has a file named
  51.             /usr/local/X11R6/include/X11/X.h then you would give the
  52.             argument "--x-includes=/usr/local/X11R6/include"
  53.  
  54.         --x-libraries=directory
  55.             Similarly, this adds a directory to the list of
  56.             directories where X-windows libraries might reside.  The
  57.             directory where they actually do reside is incorporated
  58.             into the Makefile.
  59.  
  60.         --bindir=directory
  61.             This value is incorporated into the Makefile.  The
  62.             command "make install" will copy the executables into
  63.             this directory.  The default is /usr/local/bin.
  64.  
  65.         --datadir=directory
  66.             This is incorporated into both the Makefile and the
  67.             config.h file.  It is the directory where elvis' support
  68.             files will reside after a "make install".  The default is
  69.             /usr/local/lib/elvis.
  70.  
  71.         --libs=string
  72.             This option allows you to specify which library to use
  73.             for the "termcap" user interface.  It will usually be
  74.             either -ltermcap or -lcurses.
  75.  
  76.         --ioctl=tty-style
  77.             There are three possibilities: termios, termio, and
  78.             sgtty.  These use Posix, SysV, and BSD terminal control
  79.             calls, respectively.  The Posix termios calls usually
  80.             work best.  The default is chosen by inspecting the
  81.             header files in /usr/include.
  82.  
  83.      2)    Give the command "make".  This should eventually produce programs
  84.     named "elvis" and "ref".  Source code is also included for "ctags"
  85.     and "fmt" but these aren't normally compiled because your UNIX system
  86.     probably already has better versions of them.  If you want to use
  87.     elvis' versions of "ctags" and "fmt" then you should edit the Makefile
  88.     to add those programs to the definition of the ALL macro.
  89.  
  90.     Exception: Linux gets all four programs by default, because the
  91.     versions of "ctags" and "fmt" distributed with Linux actually came
  92.     from elvis 1.8, so the 2.1i versions are newer.
  93.  
  94.      3)    You should be able to run "elvis" in the source code directory now.
  95.     Try "e2 README.html" or "e2 config.h".
  96.  
  97.     Note that we're running the e2 shell script instead of the elvis
  98.     executable.  e2 simply runs elvis in such a way that it looks for
  99.     its support files in the "lib" subdirectory, instead of the usual
  100.     directory.
  101.  
  102.      4) If all goes well, you can install elvis by becoming the superuser and
  103.         running the command "make install".  (Later, if you decide to uninstall
  104.         it you can do so via the command "make uninstall".)
  105.  
  106.      --------------------------------------------------------------------
  107.     | NOTE: If you want to compile elvis with multiple configurations,   |
  108.     | you should compile it with each configuration separately, and then |
  109.     | rename the executables, and "make clean" before running the        |
  110.     | configure script for the next configuration.  For example, to make |
  111.     | elvis both with and without X-windows, you could...                |
  112.     |                                                                    |
  113.     |    configure --with-x linux                                     |
  114.     |    make                                                         |
  115.     |    mv elvis xelvis                                              |
  116.     |    make clean                                                   |
  117.     |    configure --with-x=no linux                                  |
  118.     |    make                                                         |
  119.      --------------------------------------------------------------------
  120.  
  121. ================================================================================
  122.  
  123. MS-Windows/NT (or Windows95?), with Visual C++ 2.0 (Method #1):
  124.      1)    Run the "makwin32.bat" file.
  125.  
  126.         makwin32
  127.  
  128.      2) You can install elvis.exe by copying it into some directory in your
  129.     executation path, and the "lib" files into a subdirectory named "lib"
  130.     under the directory where you installed elvis.exe.  The following
  131.     commands are APPROXIMATELY what you need to do:
  132.  
  133.         mkdir \localbin
  134.         copy *.exe \localbin
  135.         path %path%;\localbin
  136.         mkdir \localbin\lib
  137.         copy lib\*.* \localbin\lib
  138.  
  139.  
  140. MS-Windows/NT (or Windows95?), with Visual C++ 2.0 (Method #2):
  141.      1)    Copy all of the "*.mak" files from files from the oswin32 subdirectory.
  142.  
  143.         copy oswin32\*.mak
  144.  
  145.      2)    Copy the file "osconfig.h" from the oswin32 directory to "config.h"
  146.     (without the initial "os") in the current directory.
  147.  
  148.         copy oswin32\osconfig.h config.h
  149.  
  150.      3)    Start Visual C++ 2.0, and open the "elvis.mak" file.  Select the
  151.     "Release" target.
  152.  
  153.      4)    Select the "Project->Build elvis.exe" menu item, and wait a while.
  154.     Eventually this should give you an "elvis.exe" program in the
  155.     WinRel subdirectory.  You can test this program from inside
  156.     VC++ via the <F5> key.
  157.  
  158.      5) Repeat steps 3 and 4 for the "ctags.mak", "ref.mak", and "fmt.mak"
  159.     files.
  160.  
  161.      6) You can install elvis.exe by copying it into some directory in your
  162.     executation path, and the "lib" files into a subdirectory named "lib"
  163.     under the execution directory.  The following commands are
  164.     APPROXIMATELY what you need to do:
  165.  
  166.         mkdir \localbin
  167.         copy WinRel\*.exe \localbin
  168.         copy *.exe \localbin
  169.         path %path%;\localbin
  170.         mkdir \localbin\lib
  171.         copy lib\*.* \localbin\lib
  172.  
  173. ================================================================================
  174.  
  175. MS-DOS, using Visual C++ 1.5 (Method #1):
  176.      REMINDER: MSVC++ 1.5 always puts the complete pathnames of all files
  177.         into its NMAKE files.  Because of this, you *MUST* install the
  178.         source code into a directory named "C:\MSVC\elvis-2.1i".  The
  179.         "elvis-2.1i" component of that directory name is stored in the
  180.         "elvis-2.1i.tar.gz" archive file, so you should be in the C:\MSVC
  181.         directory when you extract the files.  After extracting the files,
  182.         do a "cd elvis-2.1i"
  183.  
  184.      1) Run the "makmsdos.bat" file
  185.  
  186.         makmsdos
  187.  
  188.      2) You can install elvis by copying the *.EXE files into some directory
  189.     in your execution path, and copying the "lib" files into a subdirectory
  190.     named "lib" under the directory where you installed the *.EXE files.
  191.     The following commands are APPROXIMATELY what you need to do:
  192.  
  193.         mkdir \localbin
  194.         copy *.exe \localbin
  195.         mkdir \localbin\lib
  196.         copy \lib\*.* \localbin\lib
  197.         path {OLD PATH HERE};\localbin
  198.  
  199. MS-DOS, using Visual C++ 1.5 (Method #2):
  200.      REMINDER: MSVC++ 1.5 always puts the complete pathnames of all files
  201.         into its NMAKE files.  Because of this, you *MUST* install the
  202.         source code into a directory named "C:\MSVC\elvis-2.1i".  The
  203.         "elvis-2.1i" component of that directory name is stored in the
  204.         "elvis-2.1i.tar.gz" archive file, so you should be in the C:\MSVC
  205.         directory when you extract the files.
  206.  
  207.      1) Copy all of the "C:\MSVC\elvis-2.1i\OSMSDOS\*.MAK" files into the
  208.     "C:\MSVC\elvis-2.1i" directory.
  209.  
  210.         c:
  211.         cd \msvc\elvis-2.1i
  212.         copy osmsdos\*.mak
  213.  
  214.      2)    Copy the "\MSVC\elvis-2.1i\OSMSDOS\OSCONFIG.H" file to
  215.     "\MSVC\elvis-2.1i\CONFIG.H" Note that the "OS" is dropped from the
  216.     filename.
  217.  
  218.         copy osmsdos\osconfig.h config.h
  219.  
  220.      3) Start Visual C++ 1.5, and open the "ELVIS.MAK" project.
  221.  
  222.      4)    Select the "Project->Build ELVIS.EXE" menu item, and wait a while.
  223.     Eventually this should give you an "ELVIS.EXE" program in the
  224.     current directory.  You can test this program from inside VC++
  225.     via the <F5> key.
  226.  
  227.      5)    Repeat steps 3 and 4 for "CTAGS.MAK", "REF.MAK", and "FMT.MAK".
  228.  
  229.      6) You can install elvis by copying the *.EXE files into some directory
  230.     in your execution path, and copying the "lib" files into a subdirectory
  231.     named "lib" under the directory where you installed the *.EXE files.
  232.     The following commands are APPROXIMATELY what you need to do:
  233.  
  234.         mkdir \localbin
  235.         copy *.exe \localbin
  236.         mkdir \localbin\lib
  237.         copy lib\*.* \localbin\lib
  238.         path {OLD PATH HERE};\localbin
  239.  
  240. ================================================================================
  241.  
  242. OS/2, using IBM VisualAge C++ 3.0, IBM CSet++ 2.01 or emx/gcc and GNU
  243.      "make".  To use IBM's nmake instead of GNU make, edit the "makos2.cmd"
  244.      file and replace "make" with "nmake".
  245.  
  246.      To use a different compiler... good luck.  Basically you need to change
  247.      the setting of the "CC" macro in the Makefile, but there also come
  248.      compiler flags which you may need to change, and that's going to be a
  249.      challenge.
  250.  
  251.      1) Run "makos2.cmd" with no arguments to compile elvis with TCP/IP
  252.     support.  If your system doesn't have TCP/IP software installed,
  253.         then you can skip this step.
  254.  
  255.         makos2
  256.  
  257.      2) Run "makos2.cmd" with "--no-tcp" as an argument to compile elvis
  258.     without TCP/IP support.  The resulting binary will be named
  259.     "elvis-no-tcp.exe".  If you do have TCP/IP installed on your
  260.     computer, and never expect to use elvis on a non-TCP/IP system,
  261.     then you can skip this step.
  262.  
  263.         makeos2 --no-tcp
  264.  
  265.      3) To compile Elvis using emx/gcc linked against emx.dll providing
  266.         additional Termcap support use the "--with-emx" switch.  The
  267.         resulting binaries will all end "emx.exe", like "refemx.exe":
  268.  
  269.                 makeos2 --with-emx
  270.  
  271.      4) To compile Elvis using emx/gcc not needing emx.dll and not
  272.         providing TCP/IP support use the "--with-gcc" switch.  The
  273.         resulting binaries will all end "gcc.exe", like "refgcc.exe":
  274.  
  275.                 makeos2 --with-gcc
  276.  
  277.      5) You can install elvis by copying the *.exe files into some directory
  278.     in your execution path, and copying the "lib" files into a subdirectory
  279.     named "lib" under the directory where you installed the *.exe files.
  280.     The following commands are APPROXIMATELY what you need to do:
  281.  
  282.         mkdir \localbin
  283.         copy *.exe \localbin
  284.         mkdir \localbin\lib
  285.         copy lib\*.* \localbin\lib
  286.         path {OLD PATH HERE};\localbin
  287.  
  288.         After installing the files you should set the ELVISPATH environment
  289.         variable in your CONFIG.SYS file to the directory containing all the
  290.         stuff from the lib\ directory. This could look like:
  291.  
  292.                 set ELVISPATH=c:\localbin\lib
  293.  
  294.