Differences From Artifact [9640cd1da7]:

To Artifact [e419c1255c]:


11
12
13
14
15
16
17



18
19
20
21
22
23
24
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## 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
##
## Revision 1.257  2000/09/02 15:53:53  peterg
1075
1076
1077
1078
1079
1080
1081
1082

1083
1084
1085
1086
1087
1088
1089
1090
1091

1092
1093
1094
1095

1096
1097
1098
1099
1100
1101
1102
1078
1079
1080
1081
1082
1083
1084

1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098

1099
1100
1101
1102
1103
1104
1105
1106







-
+









+



-
+







    echo '         -D  debug -- leave log files etc'
    echo '         -I  prints more information'
    echo '         -abg start at abg.m representation'
    echo '         -c  c-code generation'
    echo '         -d  <dir>  use directory <dir>'
    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 <implicit|euler>   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 <subsystem> 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 <N> View N levels of hierachy'
    echo '         --version print version and exit'
    echo '         --versions print version of mtt and components and exit'
    exit
  fi
fi


1605
1606
1607
1608
1609
1610
1611

1612
1613
1614
1615
1616
1617

1618
1619
1620
1621
1622
1623
1624
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630







+






+







################################

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
%.dvi: %.tex

2032
2033
2034
2035
2036
2037
2038
2039
2040


2041
2042
2043
2044
2045
2046
2047
2038
2039
2040
2041
2042
2043
2044


2045
2046
2047
2048
2049
2050
2051
2052
2053







-
-
+
+








$1_type.sh: $1_cbg.m

#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)
#SUMMARY struc	structure - list of inputs, outputs and states (tex)
#SUMMARY struc*	structure - list of inputs, outputs and states (view)
2682
2683
2684
2685
2686
2687
2688
2689

2690
2691
2692
2693
2694
2695
2696
2688
2689
2690
2691
2692
2693
2694

2695
2696
2697
2698
2699
2700
2701
2702







-
+







$1_$2.html: $1_$2.dvi $1_$2.doc
	echo Creating $1_$2/$1_$2.html
	$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
$1_$2.view: $1_$2.ps
	ghostview $1_$2.ps&
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714



2715
2716
2717
2718
2719
2720
2721
2711
2712
2713
2714
2715
2716
2717



2718
2719
2720
2721
2722
2723
2724
2725
2726
2727







-
-
-
+
+
+







endif

# 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'&

#View a tex file

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]