2 |
# |
# |
3 |
# Apply code parsing programs to a set of source files |
# Apply code parsing programs to a set of source files |
4 |
# |
# |
5 |
set SRCDIR = work |
set SRCDIR = ./work |
6 |
set CURDIR = `pwd` |
set CURDIR = `pwd` |
7 |
|
|
8 |
echo 'Parsing code' |
echo 'Parsing code' |
9 |
echo 'Code revision requested is '$1 |
#eh3 echo 'Code revision requested is '$1 |
10 |
|
|
11 |
\rm -fr $SRCDIR |
\rm -f $SRCDIR |
|
|
|
|
# A simple example |
|
|
#mkdir -p $SRCDIR |
|
|
#cd $SRCDIR |
|
|
#cp -pr ${CURDIR}/model . |
|
|
#cp -pr ${CURDIR}/pkg . |
|
|
#cp -pr ${CURDIR}/callTree.F . |
|
|
#cp -pr ${CURDIR}/callTree.header . |
|
12 |
|
|
13 |
# Applying it to the whole code ( first -d will only work on local 18.24.3 system ) |
# Applying it to the whole code ( first -d will only work on local 18.24.3 system ) |
14 |
cvs -d /u/gcmpack co -d $SRCDIR -P -r $1 MITgcm > checkout.log |
#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 |
cd $SRCDIR |
|
cp -pr ${CURDIR}/callTree.F . |
|
|
cp -pr ${CURDIR}/callTree.header . |
|
25 |
|
|
26 |
set fl = `find . -name '*.F'` |
set fl = `/usr/bin/find . -name '*.F'` |
27 |
set hl = `find . -name '*.h'` |
set hl = `/usr/bin/find . -name '*.h'` |
28 |
|
|
29 |
# Extract definition information |
# Extract definition information |
30 |
echo "o Extracting definition information" |
### echo "o Extracting definition information" |
31 |
( cd ${CURDIR}/../DefinitionParser; make ) |
### ( cd ${CURDIR}/../DefinitionParser; make ) |
32 |
cat $fl $hl | ${CURDIR}/../DefinitionParser/a.out > thedefs |
### cat $fl $hl | ${CURDIR}/../DefinitionParser/a.out > thedefs |
33 |
|
|
34 |
# Generate hyperlinked code and browser files. |
# Generate hyperlinked code and browser files. |
35 |
echo "o Generating hyperlinked code (this takes a few minutes)" |
echo "o Generating hyperlinked code (this takes a few minutes)" |
55 |
echo "o Making buildweb sub-directory entries for vdb/" |
echo "o Making buildweb sub-directory entries for vdb/" |
56 |
mv vdb buildweb/vdb |
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 |
# Tar up buildweb part |
64 |
( cd buildweb ; rm vdb/tmp1; rm vdb/tmp2; tar -czvf ../web.tgz . >& /dev/null ) |
( cd buildweb ; rm vdb/tmp1; rm vdb/tmp2; tar -czvf ../web.tgz . >& /dev/null ) |