Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -15,10 +15,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.376 2003/05/09 09:46:35 gawthrop +## Fixed html output of figures +## ## Revision 1.375 2003/05/08 18:42:52 gawthrop ## Generate pdf from ps (using hyperref package for links etc) ## ## Revision 1.374 2003/04/17 20:57:27 geraint ## Added -sort option to allow direct generation of ode2odes.m using sese.m @@ -1577,10 +1580,13 @@ echo "$1 is an invalid argument - ignoring" ;; esac shift done +## Create switches string for adding to file names. + MTT_SWITCHES=`echo ${mtt_switches} | sed 's/ //g' | sed 's/^-u-q//'` + #Print header if not in quiet (-q) mode. if [ "$quiet" != "quiet" ]; then echo echo 'MTT (Model Transformation Tools) version' $version echo '($Date$)' @@ -2129,10 +2135,11 @@ ##echo $target ##target=${sys}_${rep}.${lang} ## Arguments ARGS=$4; _ARGS=-$4; __ARGS=`echo $_ARGS | tr ',' '-'` +__ARGS="${MTT_SWITCHES}${__ARGS}" # Save up the argument list in a file; but only if argument has changed #DIFF doesn't like empty files - so put a blank if empty #if [ -z "$ARGS" ]; then # ARGS=' '; @@ -2365,10 +2372,15 @@ .PRECIOUS: mtt_%.o mtt_%.o: mtt_%.cc echo Compiling mtt_\$*.cc ${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c $< -DCODEGENTARGET=STANDALONE $define_octave_dev +# Copy aliased subsystems +$1_aliased_subsystems_copied: + lbl2component $1 | sh || exit 1 # Grab specified components now + touch $1_aliased_subsystems_copied + # Generates code to write reduce code $1_ode_write.r: $1_def.m def2write_r $1 $2 $computation ifeq ("$sensitivity","sensitivity") @@ -2739,11 +2751,10 @@ endif #SUMMARY rbg raw bond graph (m) #Raw bond graph: fig file to mfile $1_rbg.m: $1_abg.fig $1_lbl.txt - lbl2component $1 | sh || exit 1 # Grab specified components now rbg_fig2m $1 $1_cmp.m: $1_rbg.m $1_fig.fig: $1_rbg.m @@ -2759,11 +2770,11 @@ #SUMMARY sub Executable subsystem list (sh) ifeq ($start_at_abg,yes) $1_sub.sh: $1_abg.m abg2sub_m2sh $1 else -%_sub.sh: %_cmp.txt +%_sub.sh: %_cmp.txt %_aliased_subsystems_copied cmp2sub_txt2sh \$* endif #SUMMARY sub LaTeX subsystem list (tex) #SUMMARY sub subsystem list (ps) @@ -3574,10 +3585,11 @@ $1_$2.$ps : $1_$2.fig echo Creating $1_$2.$ps fig2dev -L$eps $1_$2.fig > $1_$2.$ps else ## Multiple plots $1_$2.$ps : $1_$2.fig + mtt -q -r $1 $2 dat $4 echo Creating $1_$2$__ARGS.$ps fig2dev -L$eps $1_$2$__ARGS.fig > $1_$2$__ARGS.$ps endif endif