next up previous contents
Next: Testing Your Installation Up: Shore Software Installation Manual Previous: Installing a Binary Release

Subsections
 

Compiling and Installing the Source Release

This section describes how to re-build Shore from the source release. First, un-tar the release somewhere. Set the shell variables TARDIR and SHROOT and create the directory $SHROOT as explained in the Requirements section. You can extract the sources in the same directory as a binary or documentation release, or you can make a new directory for them.

    # Go to a directory where you want to install 
    # the sources.
    # For simplicity, we let that be $SHROOT.
    # If you use another directory, make the
    # appropriate substitution for SHROOT in
    # the next step.
    set SRCDIR=$SHROOT
    cd $SRCDIR
    gzip -d -c $TARDIR/src.tar.gz | tar xvf -
(users of sh, ksh, etc. should omit the word "set").

This step creates directories $SRCDIR/config, $SRCDIR/tools, and $SRCDIR/src. The directions below tell you how to determine where the binaries will be installed when you build Shore from the sources.

 

Setting Configuration Options

Before you build Shore, you must give values to some configuration options. These options are located at the top of the file $SRCDIR/config/config.h.

    vi $SRCDIR/config/config.h

For compilation to succeed you must set the values of FlexLib and FlexInclude to the absolute paths of the flex library libfl.a and the directory containing FlexLexer.h, respectively. Similarly, you must set TclLib and TclInclude to the absolute paths of the TCL library libtcl.a, and the directory containing tcl.h. In addition, either make sure that gcc, g++, bison, flex, perl, and tcl are in your path or modify the corresponding variables in $SRCDIR/config/config.h as appropriate. Be sure that you are you have the correct versions of these programs as indicated in the Requirements section. Also be sure that your path is set up so that "make" invokes GNU make.

You may also change the IncludeDebugCode, Debugging, Optimize, RcDebugging, and InstallDir options as indicated by comments in the config.h file.

 

Compilation Steps

    cd $SRCDIR

    # generate the Makefiles.
    perl tools/makemake -r

    # start compiling
    cd $SRCDIR/src
    make

The Perl script tools/makemake generates a Makefile from the Imakefile in each source directory, as controlled by various files in the $SRCDIR/config directory. (Unlike previous releases of Shore, we no longer used the imake utility from the X Window system to generate Makefiles. The script makemake, although inspired by imake is written from scratch in Perl and has many features lacking in imake.) Once Makefiles are generated, later changes to Imakefiles can be installed by typing make make in the src directory.

The command make depend can be used to generate .depend files in all the source directories. It is not necessary to invoke this command before compiling Shore, but if you intend to make modifications to any source files, it is a good idea to do it before proceeding, to ensure that modifications of header files, sdl grammar files, etc. properly cause recompilation of all affected files. Typing make in one directory will only build programs in that directory. Therefore, if you are making changes in one source directory, you can do a local make to check for compilation errors, but you should then do a make in the directory $SRCDIR/src to make sure that all other directories that depend on your changes are rebuilt. You can type make depend before make all if you like. It will build the tools it needs to complete its job. For example, make depend effectively does make all in $SRCDIR/src/rpc4.0/rpcgen because rpcgen is needed to make the dependencies in the Shore Value-Added Server.

The principal make targets (all, depend, install, clean, etc.) descend recursively into all sub-directories of the directory in which they are invoked. There are counterparts all_local, depend_local, install_local, clean_local, etc.) that affect only the current directory.

 

Installing the Compiled Files

The make target install installs executable files in $SRCDIR/installed/bin, include files in $SRCDIR/installed/include, and other supporting files in $SRCDIR/installed/lib. It also installs code and README files from src/examples and src/oo7 in $SRCDIR/installed/examples. (You can replace $SRCDIR/installed by another location by changing the definition of InstallDir in $SRCDIR/config/config.h and re-running make make).

    # edit InstallDir in config/config.h if you
    # want to change the destination 

    cd $SRCDIR/src
    make install


next up previous contents
Next: Testing Your Installation Up: Shore Software Installation Manual Previous: Installing a Binary Release
This page was generated from LaTeX sources
10/27/1997