Index: mttroot/mtt/bin/mttrc.csh ================================================================== --- mttroot/mtt/bin/mttrc.csh +++ mttroot/mtt/bin/mttrc.csh @@ -1,7 +1,7 @@ #!/bin/csh -## Automatically generated from bashrc on Wed May 9 09:02:08 BST 2001 - DO NOT EDIT +## Automatically generated from bashrc on Wed Apr 24 10:24:58 BST 2002 - DO NOT EDIT #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### @@ -15,10 +15,21 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.25 2002/04/02 09:16:39 geraint +## Tidied up library search paths, now assumes that system libraries are set up correctly. +## For Debian, this means installing the following: blas-dev, fftw-dev, lapack-dev, libncurses5-dev, libkpathsea-dev, libreadline-dev +## It may also be necessary to run /sbin/ldconfig on the relevant directories (especially Octave's). +## +## Revision 1.24 2001/10/15 14:28:35 gawthrop +## Now has . at start of components library path $MTT_COMPONENTS +## +## Revision 1.23 2001/07/24 22:32:49 gawthrop +## Use gv, not ghostview +## ## Revision 1.22 2001/04/12 03:08:00 geraint ## Improved sh->csh conversion, reduces environment namespace pollution. ## ## Revision 1.21 2001/04/10 13:56:13 gawthrop ## Uses standard mkoctfile @@ -112,11 +123,11 @@ setenv MTTPATH $MTT_BASE/bin setenv MTT_LIB $MTT_BASE/lib setenv MTT_DOC $MTT_BASE/doc setenv MTT_CC $MTT_BASE/cc - setenv MTT_COMPONENTS $MTT_LIB/comp + setenv MTT_COMPONENTS .:$MTT_LIB/comp setenv MTT_CRS $MTT_LIB/cr setenv MTT_EXAMPLES $MTT_LIB/examples setenv MTT_REP $MTT_LIB/rep setenv PATH $PATH\:$MTTPATH\:$MTTPATH/trans\:$MTT_CC @@ -144,11 +155,11 @@ -pwidth 30 \ -library_dir $MTT_LIB/xfig/\ " # Setup ps viewer - setenv PSVIEW 'ghostview' + setenv PSVIEW 'gv' # Setup pdf viewer setenv PDFVIEW 'acroread' # Setup html viewer @@ -170,32 +181,22 @@ # ode2odes.exe stuff # local system set PLAT="i686-pc-linux-gnu" -# PREFIX="/usr/local" set PREFIX="/usr" set GCCVERS="2.95.2" -set 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 -set IOCTAVE="-I${PREFIX}/include/octave" +set IOCTAVE="-I${PREFIX}/include/octave/ -I${PREFIX}/include/octave/octave" # library paths -# LOCTAVE="-L${PREFIX}/lib/octave -loctave -lcruft -loctinterp" -set LOCTAVE="-L${PREFIX}/lib/octave -loctave -lcruft -loctinterp" -set LKPATHSEA="-L${SRCOCTAVE}/kpathsea -lkpathsea" -set LREADLINE=" -L${SRCOCTAVE}/readline -lreadline" -set LSYSTEM="-ldl -lm -lncurses" -set LF2C="-L${PREFIX}/lib/gcc-lib/${PLAT}/${GCCVERS} -lg2c" +set OCTAVEVERS=`octave --version | awk '{ print $4 }'` +set LOCTAVE="-L${PREFIX}/lib/octave-${OCTAVEVERS} -loctave -lcruft -loctinterp" +set LSYSTEM="-ldl -lm -lncurses -lkpathsea -lreadline -lblas -llapack -lfftw -lg2c" # compiler options set DEBUG="-g" set OPTIM="-O3" @@ -203,8 +204,8 @@ # exported variables setenv MTT_CXX "g++" setenv MTT_CXXFLAGS "${DEBUG} ${OPTIM} ${FLAGS}" - setenv MTT_CXXLIBS "${LOCTAVE} ${LKPATHSEA} ${LREADLINE} ${LF2C} ${LSYSTEM}" + setenv MTT_CXXLIBS "${LOCTAVE} ${LSYSTEM}" setenv MTT_CXXINCS "-I. ${IOCTAVE}" setenv MTT_LDFLAGS " " Index: mttroot/mtt/bin/trans/cse2smx_lang ================================================================== --- mttroot/mtt/bin/trans/cse2smx_lang +++ mttroot/mtt/bin/trans/cse2smx_lang @@ -2,11 +2,11 @@ ###################################### ##### Model Transformation Tools ##### ###################################### -# Bourne shell script: cse2smx_r +# Bourne shell script: cse2smx_lang # Constrained-state equation to state matrices with x vector # Used for implicit integration # Copyright (C) 2000 by Peter J. Gawthrop ## Modified from eailier version Index: mttroot/mtt/bin/trans/octave_ode2odes ================================================================== --- mttroot/mtt/bin/trans/octave_ode2odes +++ mttroot/mtt/bin/trans/octave_ode2odes @@ -11,10 +11,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.4 2001/03/30 15:13:58 gawthrop +## Rationalised simulation modes to each return mtt_data +## ## Revision 1.3 2000/05/19 17:47:56 peterg ## Agument to state ## ## Revision 1.2 2000/05/11 13:43:14 peterg ## No change @@ -28,15 +31,15 @@ echo Creating $1_odes.dat2 $MATRIX <octave_ode2odes.log 2>mtt_error.txt ## Set up the simulation parameters par = $1_numpar; x_0 = $1_state(par); - simpar = $1_simpar; + simpar = $1_simpar mtt_data = $1_ode2odes(x_0,par,simpar); if is_complex(mtt_data) mtt_error("octave_ode2odes: Simulated data is complex - something is wrong!"); mtt_data = real(mtt_data); endif; save -ascii $1_odes.dat2 mtt_data EOF mtt_error mtt_error.txt Index: mttroot/mtt/bin/xmtt ================================================================== --- mttroot/mtt/bin/xmtt +++ mttroot/mtt/bin/xmtt @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.5 2000/09/14 07:50:08 peterg +## *** empty log message *** +## ## Revision 1.4 1999/10/19 00:34:10 peterg ## *** empty log message *** ## ## Revision 1.3 1999/08/18 06:17:55 peterg ## Modular form @@ -27,35 +30,65 @@ ## Revision 1.1 1998/10/20 08:15:17 peterg ## Initial revision ## ############################################################### +#Basic paths +dotfile="$HOME/.mtt" +xdotfile="${dotfile}/xmtt" + +repfile="${xdotfile}/reps" +exfile="${xdotfile}/examples" +menufile=".xmtt_menu" + #Look for a command line argument while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in - --help ) echo xmtt - echo xmtt -update + --help|-h ) echo "usage:" + echo " xmtt" + echo " xmtt --update" + echo " xmtt --example example_name" + echo " xmtt --help" exit;; - -update ) echo Creating representation list for mtt; - mtt2reps_txt> $MTTPATH/REPS; - echo Creating examples list for mtt; - mtt -q help examples> $MTTPATH/EXAMPLES;; - -example ) examples='examples';; + + --update|-u ) echo Creating representation list for mtt; + mtt2reps_txt> ${repfile}; + echo Creating examples list for mtt; + mtt -q help examples> ${exfile}; + exit;; + + --example|-e ) shift; example=$1;; *) echo "$1 is an invalid argument - ignoring" ;; esac shift done -if [ -n "$examples" ]; then - mtt -q copy $1; - cd $1; +if [ -n "${example}" ]; then + mtt -q copy ${example}; + cd ${example}; xmtt exit fi + +## Make sure files exist +if [ -e "${xdotfile}" ]; then + echo ${xdotfile} exists >/dev/null +else + echo Creating ${xdotfile} + mkdir --parents ${xdotfile} +fi + +if [ -e "${repfile}" ]; then + echo ${repfile} exists >/dev/null +else + echo Creating ${repfile} and ${exfile} + xmtt --update + echo done. +fi ## Create the menu -mtt_make_menu > .xmtt_menu +mtt_make_menu > ${menufile} ## Use tk shell (wish) name=`basename $PWD` -wish .xmtt_menu -name $name +wish ${menufile} -name $name