Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +# Revision 1.62 1997/03/20 17:48:50 peterg +# Better _input.c file default. +# # Revision 1.61 1997/03/20 16:53:01 peterg # Generates c files using include statements. # # Revision 1.60 1997/03/20 10:25:41 peterg # Generates a compehensive default params file. @@ -312,31 +315,35 @@ # Clean up if [ "$1" = "clean" ] && [ "$2" = "" ]; then echo 'Removing all generated files for all systems' rm -f *.log mtt_info.txt warning.txt rm -f *_abg.m *_abg.ps *_args.* *_cr.r *_cr.txt - rm -f *_sympar.r *_sympar.c *_sympar.txt + rm -f *_sabg.fig *_sabg.ps + rm -f *_sympar.r *_sympar.c *_sympar.h *_sympar.txt rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* rm -f *_sub.sh *_type.sh rm -f *_dae*.* *_cse.* *_ode*.c *_ode*.m *_obs.* *_rfe.* *_ss.* rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.* rm -f *_numpar.m *_numpar.c - rm -f mtt_error.txt mtt_info.txt a.out + rm -f *_unique_raw_list *_raw_list + rm -f mtt_error.txt mtt_info.txt a.out exit fi # Clean up named system if [ "$2" = "clean" ] && [ "$3" = "" ]; then echo 'Removing all generated files for system ' $1 rm -f *.log mtt_info.txt warning.txt rm -f $1_abg.m $1_abg.ps $1_args.* $1_cr.r $1_cr.txt - rm -f $1_sympar.r $1_sympar.c $1_sympar.txt + rm -f $1_sabg.fig $1_sabg.ps + rm -f $1_sympar.r $1_sympar.c $1_sympar.h $1_sympar.txt rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* rm -f $1_sub.sh $1_type.sh rm -f $1_dae*.* $1_cse.* $1_ode*.c $1_ode*.m $1_obs.* $1_rfe.* $1_ss.* rm -f $1_dm.* $1_csm.* $1_sm.* $1_tf.* $1_sr*.* $1_ir*.* $1_*fr.* rm -f $1_numpar.m $1_numpar.c + rm -f $1_unique_raw_list $1_raw_list rm -f mtt_error.txt mtt_info.txt a.out exit fi #SUMMARY abg acausal bond graph (fig) @@ -485,12 +492,13 @@ if [ "$level" = "0" ]; then \ mv $1_cr.txt MTT_cr.txt; \ else \ cat $1_cr.txt >> MTT_cr.txt; \ fi - - sh $1_sub.sh "mtt -q -l $level+1 " ' cr txt' + + sh $1_sub.sh "rm -f " '_cr.txt' # Remove the txt.cr files + sh $1_sub.sh "mtt -q -l $level+1 " ' cr txt' #Create new ones if [ "$level" = "0" ]; then \ sort -u MTT_cr.txt> $1_cr.txt; \ fi @@ -508,12 +516,12 @@ mv $1_sympar.txt MTT_sympar.txt; \ else \ cat $1_sympar.txt >> MTT_sympar.txt; \ fi - sh $1_sub.sh "mtt -q -l $level+1 " ' sympar txt' - + sh $1_sub.sh "rm -f " '_sympar.txt' # Delete sympar files + sh $1_sub.sh "mtt -q -l $level+1 " ' sympar txt' # and recreate them if [ "$level" = "0" ]; then \ sort -u MTT_sympar.txt> $1_sympar.txt; \ fi @@ -698,11 +706,11 @@ #SUMMARY dae differential-algebraic equations (m) #SUMMARY dae differential-algebraic equations (tex) #SUMMARY dae differential-algebraic equations (view) #SUMMARY dae differential-algebraic equations (ps) #Differential-algebraic equations -$1_dae.r: $1_ese.r $1_cr.r $1_sympar.r +$1_dae.r: $1_ese.r $1_cr.r $1_sympar.r $1_params.r ese2dae_r $1; tidy $1_dae.r $1_dae.m: $1_def.r $1_dae.r $1_sympar.r dae_r2m $1; matlab_tidy $1_dae.m; matlab_tidy $1_daeo.m $1_dae.c: $1_def.r $1_dae.r $1_sympar.r dae_r2c $1; c_tidy $1_dae.c