Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.95 1997/12/04 10:05:02 peterg +## Compiler now symbolocic $cc +## # Revision 1.94 1997/11/20 11:23:16 peterg # Changed gcc to cc # ## Revision 1.93 1997/09/18 16:57:28 peterg ## _sympar.txt now has a second column - the system type from whence the @@ -352,10 +355,12 @@ while [ -n "`echo $1 | grep '-'`" ]; do mtt_switches="$mtt_switches $1" case $1 in -q ) quiet=quiet ;; + -p ) + print='-p';; -c ) computation=c ;; -o ) dae_is_ode=1 ;; -s ) @@ -366,21 +371,29 @@ echo "$1 is an invalid argument - ignoring" ;; esac shift done - #Print header if not in quiet (-q) mode. if [ "$quiet" != "quiet" ]; then echo echo 'MTT (Model Transformation Tools) version 2.5++ ($Date$)' echo 'This is free software with ABSOLUTELY NO WARRANTY.' echo 'Type `mtt warranty'\' 'for details.' echo fi + +#Check the principle paths +mtt_check_vars $print + +# Exit if just printing paths +if [ "$print" != "" ]; then + exit +fi if [ -z "$1" ]; then + if [ -z "$print" ]; then echo 'Usage: mtt help -- mtt on-line help' echo ' mtt info -- info-based manual' echo ' mtt info topic' echo ' mtt hinfo -- hypertext manual' echo ' mtt manual -- dvi manual' @@ -390,14 +403,16 @@ echo ' mtt copy ' echo ' mtt vc' echo ' mtt ' echo ' mtt ' echo 'Options: -q quiet mode' + echo ' -p print environment variables' echo ' -c c-code generation' echo ' -o ode and dae are the same' echo ' -s use switch (ISW and CSW) components' exit + fi fi if [ "$1" = "info" ] && [ "$3" = "" ]; then echo Invoking info @@ -654,12 +669,10 @@ echo Version control is not appropriate for representation $2 exit ;; esac fi -#Check the principle paths -mtt_check_vars # This is the main mtt programme $MAKE -s -f - $1_$2.$3 << EOF # Cancel implicit rules I don't want