Index: mttroot/mtt/bin/mttrc ================================================================== --- mttroot/mtt/bin/mttrc +++ mttroot/mtt/bin/mttrc @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.21 2001/04/10 13:56:13 gawthrop +## Uses standard mkoctfile +## ## Revision 1.20 2001/04/10 13:08:19 gawthrop ## Smoother translation to .cs using sh2csh ## ## Revision 1.19 2001/03/30 15:13:49 gawthrop ## Rationalised simulation modes to each return mtt_data @@ -165,43 +168,43 @@ # ode2odes.exe stuff # local system - export PLAT="i686-pc-linux-gnu" + PLAT="i686-pc-linux-gnu" # PREFIX="/usr/local" - export PREFIX="/usr" - export GCCVERS="2.95.2" - export SRCOCTAVE="/cvs/octave" + PREFIX="/usr" + GCCVERS="2.95.2" + SRCOCTAVE="/cvs/octave" # PLAT="mips-sgi-irix6.5" # PREFIX="/usr/people/bevangp/GNU" # GCCVERS="2.95.2" # SRCOCTAVE="${PREFIX}/../build/octave-2.1.33" # include paths - export IOCTAVE="-I${PREFIX}/include/octave" + IOCTAVE="-I${PREFIX}/include/octave" # library paths # LOCTAVE="-L${PREFIX}/lib/octave -loctave -lcruft -loctinterp" - export LOCTAVE="-L${PREFIX}/lib/octave -loctave -lcruft -loctinterp" - export LKPATHSEA="-L${SRCOCTAVE}/kpathsea -lkpathsea" - export LREADLINE=" -L${SRCOCTAVE}/readline -lreadline" - export LSYSTEM="-ldl -lm -lncurses" - export LF2C="-L${PREFIX}/lib/gcc-lib/${PLAT}/${GCCVERS} -lg2c" + 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" # compiler options - export DEBUG="-g" - export OPTIM="-O3" - export FLAGS="-fno-rtti -fno-exceptions -fno-implicit-templates" + DEBUG="-g" + OPTIM="-O3" + FLAGS="-fno-rtti -fno-exceptions -fno-implicit-templates" # exported variables export MTT_CXX="g++" export MTT_CXXFLAGS="${DEBUG} ${OPTIM} ${FLAGS}" export MTT_CXXLIBS="${LOCTAVE} ${LKPATHSEA} ${LREADLINE} ${LF2C} ${LSYSTEM}" export MTT_CXXINCS="-I. ${IOCTAVE}" export MTT_LDFLAGS=" " fi Index: mttroot/mtt/bin/sh2csh ================================================================== --- mttroot/mtt/bin/sh2csh +++ mttroot/mtt/bin/sh2csh @@ -2,10 +2,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.2 1999/03/11 04:12:26 peterg +## Put in heading. +## ## Revision 1.1 1999/03/11 04:02:45 peterg ## Initial revision ## ############################################################### @@ -17,11 +20,19 @@ cat<$1.csh #!/bin/csh ## Automatically generated from bashrc on $date - DO NOT EDIT EOF -cat $1 | sed 's/export/setenv/' | sed 's/=/ /' >>$1.csh +# grep -v lines need to be replaced with proper if...then conversion +cat $1 |\ + sed 's/export[ \t]*\([A-Za-z0-9_]*\)=/setenv\ \1\ /' |\ + sed 's/^\([\ \t]*\)\([A-Za-z0-9_]*\)=/set\ \2=/' |\ + grep -v "if \[ -z " |\ + grep -v "echo mttrc requires one argument: eg mttrc /usr/share/mtt/latest" |\ + grep -v "else" |\ + grep -v -e "^fi" \ +>>$1.csh echo done.