Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.260 2000/09/14 09:59:08 peterg +## Added -viewlevel switch +## ## Revision 1.259 2000/09/11 08:21:27 peterg ## Introduced MML - but for _tf rep only. ## ## Revision 1.258 2000/09/11 08:17:28 peterg ## Extended _simp.r to incude default switches @@ -1077,24 +1080,25 @@ echo ' -abg start at abg.m representation' echo ' -c c-code generation' echo ' -d use directory ' echo ' -dc Maximise derivative (not integral) causality' echo ' -dc Maximise derivative (not integral) causality' - echo ' -i [implicit,euler] Use implicit or euler integration' + echo ' -i Use implicit or euler integration' echo ' -o ode is same as dae' echo ' -oct use oct files in place of m files where appropriate' echo ' -opt optimise code generation' echo ' -p print environment variables' echo ' -partition partition hierachical system' echo ' -r reset time stamp on representation' echo ' -s try to generate sensitivity BG (experimental)' echo ' -ss use steady-state info to initialise simulations' echo ' -stdin read input data from standard input for simulations' + echo ' -sub operate on this subsystem' echo ' -t tidy mode (default)' echo ' -u untidy mode (leaves files in current dir)' echo ' -v verbose mode' - echo ' -viewlevel N View N levels of hierachy' + echo ' -viewlevel View N levels of hierachy' echo ' --version print version and exit' echo ' --versions print version of mtt and components and exit' exit fi fi @@ -1607,16 +1611,18 @@ target=$1_$2.$3 # Create some strings Subsystem=$1$subsystem; +Subsystem_=$Subsystem"_" Subsystem_ese=$Subsystem"_ese" Subsystem_def=$Subsystem"_def" Subsystem_rdae=$Subsystem"_rdae" Subsystem_dae=$Subsystem"_dae" Subsystem_subs=$Subsystem"_subs" Subsystem_cr=$Subsystem"_cr" +Subsystem_cbg=$Subsystem"_cbg" #echo Target is $target, Subsystem is $Subsystem $MAKE -S $verbose -f - $target << EOF # Cancel implicit rules I don't want @@ -2034,12 +2040,12 @@ #SUMMARY cbg* causal bond graph (fig) #SUMMARY cbg* causal bond graph (ps) #SUMMARY cbg* causal bond graph (view) #Causal bond graph: mfile to fig conversion -$1_cbg.fig: $1_cbg.m $1_rbg.m $1_fig.fig $1_type.sh - cbg_m2fig $1 +$1_cbg.fig: $1_cbg.m $1_fig.fig $1_type.sh + sh $1_type.sh 'echo cbg_m2fig ' ' ' ' ' | sh #SUMMARY ese elementary system equations (r) #SUMMARY def definitions - system orders etc. (r) #SUMMARY def definitions - system orders etc. (m) #SUMMARY struc* structure - list of inputs, outputs and states (txt) @@ -2684,11 +2690,11 @@ $LATEX2HTML $1_$2.doc endif #Default view ifeq ($REPTYPE,bg) -$1_$2.view : $1_$2.pview +$1_$2.view : $Subsystem_$2.pview endif ifeq ($REPTYPE,data) # This is the gnuplot version which leaves lots of defunct processes # $1_$2.view : $1_$2.dview @@ -2707,13 +2713,13 @@ # Hypertext view $1_$2.hview: $1_$2.html $HTMLVIEW $1_$2/$1_$2.html& #View a ps file -$1_$2.pview: $1_$2.ps - echo Creating view of $1_$2 - mtt_multi $PSVIEW $1 $2 ps $viewlevel | sh +$Subsystem_$2.pview: $Subsystem_$2.ps + echo Creating view of $1_$2 - ps file + mtt_multi $PSVIEW $Subsystem $2 ps $viewlevel | sh #View a gdat file $1_$2.dview: $1_$2.gdat echo Creating view of $1_$2 gdat2view $1_$2 '$ARGS'&