/[MITgcm]/mitgcm.org/devel/buildweb/code-browser/MakeBrowseableMITGCM/makebrowseablecodepages.sh
ViewVC logotype

Contents of /mitgcm.org/devel/buildweb/code-browser/MakeBrowseableMITGCM/makebrowseablecodepages.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Fri Jul 15 14:48:45 2005 UTC (20 years ago) by cnh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +5 -5 lines
File MIME type: application/x-sh
Restrict src tree search so we don't pick up C .h files (which break f90mapper)

1 #!/bin/csh -f
2 #
3 # Apply code parsing programs to a set of source files
4 #
5 set SRCDIR = ./work
6 set CURDIR = `pwd`
7
8 echo 'Parsing code'
9 #eh3 echo 'Code revision requested is '$1
10
11 \rm -f $SRCDIR
12
13 # Applying it to the whole code ( first -d will only work on local 18.24.3 system )
14 #eh3 Replace CVS checkout with a soft-link
15 #eh3 cvs -d /u/gcmpack co -d $SRCDIR -P -r $1 MITgcm > checkout.log
16 if (-d ../../../../../MITgcm) then
17 ln -s ../../../../../MITgcm work
18 else
19 echo "ERROR: please get a copy of the MITgcm code and locate it at:"
20 echo " "`pwd`"../../../../../MITgcm"
21 endif
22 cp -fpr callTree.F $SRCDIR
23 cp -fpr callTree.header $SRCDIR
24 cd $SRCDIR
25
26 set fl = `/usr/bin/find pkg eesupp model verification -name '*.F'`
27 set hl = `/usr/bin/find pkg eesupp model verification -name '*.h'`
28
29 # Extract definition information
30 echo "o Extracting definition information"
31 ( cd ${CURDIR}/../DefinitionParser; make )
32 cat $fl $hl | ${CURDIR}/../DefinitionParser/a.out > thedefs
33
34 # Generate hyperlinked code and browser files.
35 echo "o Generating hyperlinked code (this takes a few minutes)"
36 ( cd ${CURDIR}/../F90Mapper; make )
37 ${CURDIR}/../F90Mapper/f90mapper -d thedefs $fl $hl >& mapper.log
38
39 # Make the calling tree hyperlinked
40 # callTree.F was hand-extracted from model/src/the_model_main.F
41 echo "o Generating hyperlinked call tree"
42 grep 'New variable' mapper.log | awk '{print $3, $6}' > varkey
43 awk -f ${CURDIR}/parseCallTree.awk callTree.F > callTree.html
44
45 # Create and fill the subdirectories for the MITgcm web pages
46 echo "o Making buildweb sub-directory entries for skeletons/code_reference/"
47 \rm -fr buildweb
48 mkdir -p buildweb/skeleton/code_reference
49 cp code_reference-rtparm_exp.htm buildweb/skeleton/code_reference/parameters.html
50 cp code_reference-sf_exp.htm buildweb/skeleton/code_reference/sourcefiles.html
51 cp code_reference-subfunc_exp.htm buildweb/skeleton/code_reference/subroutine.html
52 cp code_reference-vi_exp.htm buildweb/skeleton/code_reference/variabledictionary.html
53 cp callTree.html buildweb/skeleton/code_reference
54
55 echo "o Making buildweb sub-directory entries for vdb/"
56 mv vdb buildweb/vdb
57
58 #eh3 Create a "byname" directory containing soft-links that tie the symbol
59 #eh3 names to the short-URL occurance tables:
60 #eh3 makeByname.pl <
61 ( cd buildweb ; ${CURDIR}/create_name_links )
62
63 # Tar up buildweb part
64 ( cd buildweb ; rm vdb/tmp1; rm vdb/tmp2; tar -czvf ../web.tgz . >& /dev/null )

  ViewVC Help
Powered by ViewVC 1.1.22