Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.178 1998/08/11 13:38:35 peterg +## Zapped the obsolete args stuff +## ## Revision 1.177 1998/07/30 17:32:44 peterg ## VERSION 3.0 ## ## Revision 1.176 1998/07/27 20:25:15 peterg ## Sorted out new mtt_r2m @@ -1107,28 +1110,29 @@ REPTYPE='data' ;; *) REPTYPE='tex' ;; esac -## # Save up the argument list in a file; but only if argument has changed -## ARGS=$4; _ARGS=-$4; __ARGS=`echo $_ARGS | tr ',' '-'` -## -## #DIFF doesn't like empty files - so put a blank if empty -## if [ -z "$ARGS" ]; then -## ARGS=' '; -## _ARGS=''; -## fi -## -## cat > $1_args.new </dev/null` -## -## if [ -n "$DIFF" ]; then -## mv $1_args.new $1_args.m -## fi + +# Save up the argument list in a file; but only if argument has changed +ARGS=$4; _ARGS=-$4; __ARGS=`echo $_ARGS | tr ',' '-'` + +#DIFF doesn't like empty files - so put a blank if empty +if [ -z "$ARGS" ]; then + ARGS=' '; + _ARGS=''; +fi + +cat > $1_args.new </dev/null` + +if [ -n "$DIFF" ]; then + mv $1_args.new $1_args.m +fi # Tidy mode - operate in the directory MTT-work if [ "$tidy" = "tidy" ]; then mkdir -p MTT_work cp -u -p Makefile *.* .* MTT_work 2>/dev/null @@ -1149,10 +1153,11 @@ exit 1 fi if [ "$3" != "view" ]; then if [ "$3" != "hview" ]; then + echo Copying $1_$2.$3 cp -u -p $1_$2.$3 .. if [ "$PLOTTYPE" = "multiple" ]; then echo Copying $1_$2$__ARGS.ps @@ -1769,11 +1774,11 @@ #SUMMARY smx state matrices with variable state x (r) #SUMMARY smx state matrices with variable state x (m) $1_smx.r: $1_def.r $1_def.m $1_ode.r ode2smx_lang $1 r; tidy $1_smx.r -$1_smx.m: $1_def.r $1_def.m $1_ode.r +$1_smx.m: $1_def.r $1_def.m $1_ode.r $1_sympars.txt ode2smx_lang $1 m; #SUMMARY smc controller form state matrices etc. - siso only (r) #SUMMARY smc controller form state matrices etc. - siso only (tex) #SUMMARY smc controller form state matrices etc. - siso only (m) @@ -2035,11 +2040,11 @@ $1_odes.dat: $1_odes.dat2 echo Creating $1_odes.dat dat22dat $1 odes #Generic conversion of data files from dat to (gplot) gdat format -$1_$2.gdat: $1_$2.dat $1_args.m $1_struc.txt +$1_$2.gdat: $1_$2.dat $1_struc.txt $1_args.m dat2gdat $1 $2 $4 #Generic conversion of Latex to latex document mtt.sty: echo Copying mtt.sty to here @@ -2060,17 +2065,19 @@ ifeq ($REPTYPE,data) #Create PostScript version of dat file # + another version with Args added to the name if its appropriate -$1_$2.ps: $1_$2.gdat - gdat2ps $1_$2 '$ARGS'; - ifeq ($PLOTTYPE,multiple) ifneq ($_ARGS,) +$1_$2.ps: $1_$2.gdat + gdat2ps $1_$2 '$ARGS' echo Creating $1_$2$__ARGS.ps - cp $1_$2.ps $1_$2$__ARGS.ps + cp $1_$2.ps $1_$2$__ARGS.ps +else +$1_$2.ps: $1_$2.gdat + gdat2ps $1_$2 '$ARGS' endif endif endif @@ -2131,11 +2138,11 @@ $1_$2.pdf: $1_$2.ps echo Creating $1_$2.pdf ps2pdf $1_$2.ps $1_$2.pdf #Report generation -$1_rep.make: $1_rep.txt $1_args.m +$1_rep.make: $1_rep.txt rep_txt2make $1 "$mtt_switches" reps_made: rep_txt2sh $1; touch reps_made