Artifact 1359c3287df01cbb3bb40e60676ca8f5c17ad7f8e60006a1c71438d29e8681ee:


#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: mttrc - sets up paths etc for mtt
# Usage: mttrc 

# Copyright (c) P.J.Gawthrop 1996,1977.


###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.17  2000/12/27 16:46:13  peterg
## Stripped the mtt- from paths
##
## Revision 1.16  2000/12/27 15:16:44  peterg
## If then else format
##
## Revision 1.15  2000/12/27 14:57:43  peterg
## Now takes the base path as an argument
##
## Revision 1.14  2000/12/27 13:11:43  peterg
## *** empty log message ***
##
## Revision 1.13  2000/10/03 12:12:14  peterg
## New path structure to account for three way split in mtt tree
##
## Revision 1.12  2000/09/18 12:17:07  peterg
## Now includes to control system toolbox in OCTAVE_PATH
## Don't use -path stuff - use :: instead.
##
## Revision 1.11  2000/05/21 17:55:15  peterg
## New rep path
##
## Revision 1.10  2000/05/16 11:41:23  peterg
## *** empty log message ***
##
## Revision 1.9  1999/03/11 04:02:19  peterg
## Revised so that sh2csh does its stuff.
##
## Revision 1.8  1998/07/17 19:48:46  peterg
## *** empty log message ***
##
## Revision 1.7  1998/03/24 09:11:49  peterg
## Compatible with .csh version
##
## Revision 1.6  1998/03/13 11:53:29  peterg
## reduce --> reduce 64
##
## Revision 1.5  1998/01/16 08:55:01  peterg
## MAKE=make
##
## Revision 1.4  1998/01/06 09:14:51  peterg
## Added latex2html to setup
##
# Revision 1.3  1998/01/06  09:11:26  peterg
# Removed matlab from the setup
#
# Revision 1.2  1997/12/04  10:49:16  peterg
# Put under RCS at last
# Added CC variable
#
###############################################################

MTT_BASE=$1

if [ -z "$MTT_BASE" ]; then
  echo mttrc requires one argument: eg mttrc /usr/share/mtt/latest
else
  echo Setting paths with base $MTT_BASE
  # The following line sets up the make to use -- gmake is the standard 
  # but you may wish to use lsmake for parallelism
  export MAKE='make'
  
  # The following sets up the c compiler
  export CC='gcc'
  
  # Setup the paths
  export MTTPATH=$MTT_BASE/bin
  export MTT_LIB=$MTT_BASE/lib
  export MTT_DOC=$MTT_BASE/doc
  export MTT_CC=$MTT_BASE/cc
  
  export MTT_COMPONENTS=$MTT_LIB/comp
  export MTT_CRS=$MTT_LIB/cr
  export MTT_EXAMPLES=$MTT_LIB/examples
  export MTT_REP=$MTT_LIB/rep
  
  export PATH=$PATH\:$MTTPATH\:$MTTPATH/trans\:$MTT_CC
  
  #Setup octave
  export MATRIX_PATH=$MTTPATH/trans/m//
  export MATRIX_PATH=$MATRIX_PATH\:$MTT_LIB/comp/simple//
  export MATRIX_PATH=$MATRIX_PATH\:$MTT_LIB/control//
  export MATRIX_PATH=$MATRIX_PATH\:$MTT_LIB/octave//\:\:
  
  export OCTAVE_PATH=.\:$MATRIX_PATH
  export MATRIX="octave"
  
  # Setup the symbolic stuff
  export SYMBOLIC='reduce 64'
  
  
  # Setup xfig
  export FIG="xfig  \
  	-startfontsize 20 \
  	-metric \
  	-portrait \
  	-startgridmode 2 \
  	-pheight 21 \
  	-pwidth 30 \
  	-library_dir $MTT_LIB/xfig/\
  	"
  
  # Setup ps viewer
  export PSVIEW='ghostview'
  
  # Setup pdf viewer
  export PDFVIEW='acroread'
  
  # Setup html viewer
  export HTMLVIEW='netscape'
  
  # Setup dvi viewer
  export DVIVIEW='xdvi'
  
  # Setup latex2html
  export LATEX2HTML="latex2html -contents_in_navigation -index_in_navigation -address http://mtt.sourceforge.net"
  
  # Ascend stuff
  export ASCENDLIBRARY=$MTTPATH/ascend/lib
  
  # Oct file generation - use version with no optimisation.
  export MKOCTFILE=$MTT_LIB/octave/mkoctfile

    # ode2odes.exe stuff
    # local system
    PREFIX="/usr/local"
    PLAT="i686-pc-linux-gnu"
    GCCVERS="2.95.2"
    SRCOCTAVE="/cvs/octave"
    # include paths
    IOCTAVE="-I${PREFIX}/include/octave"
    # library paths
    LOCTAVE="-L${PREFIX}/lib/octave -loctave -lcruft -loctinterp"
    LKPATHSEA="-L${SRCOCTAVE}/kpathsea -lkpathsea"
    LREADLINE=" -L${SRCOCTAVE}/readline -lreadline"
    LSYSTEM="-ldl -lm -lncurses"
    LF2C="-L${PREFIX}/lib/gcc-lib/${PLAT}/${GCCVERS} -lg2c"
    LMTTCXX="-L. -lmttcxx"
    # compiler options
    export MTT_CXX="g++"
    export MTT_CXXFLAGS="-g -O3"
    export MTT_LD="ld"
    export MTT_CXXLIBS="${LOCTAVE} ${LKPATHSEA} ${LREADLINE} ${LF2C} ${LSYSTEM} ${LMTTCXX}"
    export MTT_CXXINCS="-I. ${IOCTAVE}"

fi


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]