/[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.2 - (hide annotations) (download) (as text)
Wed Jul 23 17:54:35 2003 UTC (21 years, 11 months ago) by edhill
Branch: MAIN
Changes since 1.1: +22 -11 lines
File MIME type: application/x-sh
These are initial changes made so that the mitgcm.org web site, LaTeX
documentation, HTML code browser, etc. will build on a relatively stock
RH 9 system.

1 adcroft 1.1 #!/bin/csh -f
2     #
3     # Apply code parsing programs to a set of source files
4     #
5 edhill 1.2 set SRCDIR = ./work
6 adcroft 1.1 set CURDIR = `pwd`
7    
8     echo 'Parsing code'
9 edhill 1.2 #eh3 echo 'Code revision requested is '$1
10 adcroft 1.1
11 edhill 1.2 \rm -f $SRCDIR
12 adcroft 1.1
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 edhill 1.2 #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 adcroft 1.1 cd $SRCDIR
34    
35 edhill 1.2 set fl = `/usr/bin/find . -name '*.F'`
36     set hl = `/usr/bin/find . -name '*.h'`
37 adcroft 1.1
38     # Extract definition information
39 edhill 1.2 ### echo "o Extracting definition information"
40     ### ( cd ${CURDIR}/../DefinitionParser; make )
41     ### cat $fl $hl | ${CURDIR}/../DefinitionParser/a.out > thedefs
42 adcroft 1.1
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 edhill 1.2
48     #cnh debugging
49     #cnh exit
50 adcroft 1.1
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     # Tar up buildweb part
71     ( cd buildweb ; rm vdb/tmp1; rm vdb/tmp2; tar -czvf ../web.tgz . >& /dev/null )

  ViewVC Help
Powered by ViewVC 1.1.22