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

Annotation 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.1 - (hide annotations) (download) (as text)
Fri Sep 20 19:47:31 2002 UTC (22 years, 9 months ago) by adcroft
Branch: MAIN
Branch point for: Import
File MIME type: application/x-sh
Initial revision

1 adcroft 1.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     echo 'Code revision requested is '$1
10    
11     \rm -fr $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     cvs -d /u/gcmpack co -d $SRCDIR -P -r $1 MITgcm > checkout.log
23     cd $SRCDIR
24     cp -pr ${CURDIR}/callTree.F .
25     cp -pr ${CURDIR}/callTree.header .
26    
27     set fl = `find . -name '*.F'`
28     set hl = `find . -name '*.h'`
29    
30     # Extract definition information
31     echo "o Extracting definition information"
32     ( cd ${CURDIR}/../DefinitionParser; make )
33     cat $fl $hl | ${CURDIR}/../DefinitionParser/a.out > thedefs
34    
35     # Generate hyperlinked code and browser files.
36     echo "o Generating hyperlinked code (this takes a few minutes)"
37     ( cd ${CURDIR}/../F90Mapper; make )
38     ${CURDIR}/../F90Mapper/f90mapper -d thedefs $fl $hl >& mapper.log
39    
40     # Make the calling tree hyperlinked
41     # callTree.F was hand-extracted from model/src/the_model_main.F
42     echo "o Generating hyperlinked call tree"
43     grep 'New variable' mapper.log | awk '{print $3, $6}' > varkey
44     awk -f ${CURDIR}/parseCallTree.awk callTree.F > callTree.html
45    
46     # Create and fill the subdirectories for the MITgcm web pages
47     echo "o Making buildweb sub-directory entries for skeletons/code_reference/"
48     \rm -fr buildweb
49     mkdir -p buildweb/skeleton/code_reference
50     cp code_reference-rtparm_exp.htm buildweb/skeleton/code_reference/parameters.html
51     cp code_reference-sf_exp.htm buildweb/skeleton/code_reference/sourcefiles.html
52     cp code_reference-subfunc_exp.htm buildweb/skeleton/code_reference/subroutine.html
53     cp code_reference-vi_exp.htm buildweb/skeleton/code_reference/variabledictionary.html
54     cp callTree.html buildweb/skeleton/code_reference
55    
56     echo "o Making buildweb sub-directory entries for vdb/"
57     mv vdb buildweb/vdb
58    
59     # Tar up buildweb part
60     ( cd buildweb ; rm vdb/tmp1; rm vdb/tmp2; tar -czvf ../web.tgz . >& /dev/null )

  ViewVC Help
Powered by ViewVC 1.1.22