/[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.3 - (show annotations) (download) (as text)
Fri Aug 1 18:17:59 2003 UTC (22 years ago) by edhill
Branch: MAIN
Changes since 1.2: +4 -0 lines
File MIME type: application/x-sh
tiny cleanup

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

  ViewVC Help
Powered by ViewVC 1.1.22