4 set db
=tools
/code_dbase
8 # set this to a value to speed up the subinfo calls; set with no value for normal
9 set gofast
# default is not fast (no value given, but set)
11 if ( $#argv == 1 ) then
12 if ( $argv[1] == "fast" ) then
17 if ( ! -d tools
) then
18 echo run
$0 in top level WRF directory
20 if ( ! -x tools
/deftab ||
! -x tools
/nocontf90 ||
! -x tools
/subinfo_calls ||
! -x tools
/callgraph
) then
21 ( cd tools
/CodeBase
; make )
22 if ( ! -x tools
/deftab ||
! -x tools
/nocontf90 ||
! -x tools
/subinfo_calls ||
! -x tools
/callgraph
) then
23 echo some error building the tools
in tools
/CodeBase. Cannot
continue.
31 if ( ! -f frame
/module_state_description.f
) then
33 echo '*** ' code must be compiled first before code database can be built
34 echo '*** ' because it is based on the .f files
38 set dirs=( dyn_em frame main phys share
)
39 #set dirs=( dyn_nmm frame main phys share )
46 tools
/nocontf90
< $f |
expand | \
51 -e 's/^real,/real ,/' \
52 -e 's/^integer,/integer ,/' \
53 -e 's/^type(/type (/' \
54 -e 's/^logical,/logical ,/' \
56 tools
/deftab
$f < $db/lm_
${f:t}_1
57 /bin
/rm -f $db/lm_
${f:t}_1
61 cat -n $db/calls |
sort -u +1 > xxx
62 sort -n +0 -1 xxx |
awk '{print $2 " " $3 " " $4}' > $db/calls
64 ############ pre-compute the subinfo html entries ##########
68 foreach f
( `/bin/ls -1 $db | grep -v '\.html' | grep -v calls | grep -v '^lm_' | grep -v '^vv_' | grep -v '_descrip$'` )
69 echo creating html
file for $f
70 tools
/subinfo
$f $gofast > $db/$f.html
73 #foreach f ( `/bin/ls -1 $db/[a-f]* | grep -v '\.html' | grep -v calls | grep -v '^lm_'` )
74 # echo creating html file for $f
75 # tools/subinfo $f:t > $f.html
77 #foreach f ( `/bin/ls -1 $db/[g-m]* | grep -v '\.html' | grep -v calls | grep -v '^lm_'` )
78 # echo creating html file for $f
79 # tools/subinfo $f:t > $f.html
81 #foreach f ( `/bin/ls -1 $db/[n-t]* | grep -v '\.html' | grep -v calls | grep -v '^lm_'` )
82 # echo creating html file for $f
83 # tools/subinfo $f:t > $f.html
85 #foreach f ( `/bin/ls -1 $db/[u-z]* | grep -v '\.html' | grep -v calls | grep -v '^lm_'` )
86 # echo creating html file for $f
87 # tools/subinfo $f:t > $f.html
90 echo "Creating $db/index.html"
92 /bin
/cp tools
/callgraph.page1
$db/callgraph.html
93 tools
/callgraph wrf
7 >> $db/callgraph.html
94 cat tools
/callgraph.page2
>> $db/callgraph.html
95 /bin
/cp tools
/index.page
$db/index.html
96 /bin
/cp tools
/collapsd.gif tools
/daughter.gif tools
/exploded.gif
$db
99 #tools/callgraph wrf 0 > $db/index.html
101 #tools/callgraph wrf 1 > $db/ct2.html
103 #tools/callgraph wrf 2 > $db/ct3.html
105 #tools/callgraph wrf 3 > $db/ct4.html
107 #tools/callgraph wrf 4 > $db/ct5.html
109 #tools/callgraph wrf > $db/ctall.html