[go: up one dir, main page]

Menu

[80c337]: / dox.sh  Maximize  Restore  History

Download this file

106 lines (94 with data), 2.7 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
#!/bin/sh
# find the Doxyfile, or quit
if [ ! -f Doxyfile ]
then
echo 'No Doxyfile found in current directory' `pwd`
exit
fi
# find the doxygen command, or quit
DOXCMD=`which doxygen`
if [ "$DOXCMD" = "" ]
then
echo 'No doxygen command found in path' $PATH
exit
fi
# find the tagfile, if any
TAGFILE=`grep ^GENERATE_TAGFILE Doxyfile | sed s/GENERATE_TAGFILE\ *=\ *//`
TAGXSLT=Lurch-doxygen-tag.xsl
if [ "$TAGFILE" = "" ]
then
WILLDOTAG="Doxyfile does not generate tag file."
else
WILLDOTAG=""
fi
# find info about generating XML
XMLYN=`grep ^GENERATE_XML Doxyfile | sed s/GENERATE_XML\ *=\ *//`
if [ "$XMLYN" != "YES" ]
then
WILLDOXML="Doxyfile does not generate XML output."
else
TOPLOC=`grep ^OUTPUT_DIRECTORY Doxyfile | sed s/OUTPUT_DIRECTORY\ *=\ *//`
XMLPATH=`grep ^XML_OUTPUT Doxyfile | sed s/XML_OUTPUT\ *=\ *//`
XMLLOC=$TOPLOC/$XMLPATH
XMLXSLT=Lurch-doxygen-xml.xsl
if [ ! -f $XMLXSLT ]
then
WILLDOXML="Cannot find Doxygen XSLT stylesheet $XMLXSLT"
else
WILLDOXML=""
fi
fi
# run doxygen
echo "Running $DOXCMD Doxyfile"
$DOXCMD Doxyfile
# find the Doxygen XML output
if [ \( "$WILLDOXML" = "" \) -a \( ! -d $XMLLOC \) ]
then
WILLDOXML="Cannot find Doxygen XML output directory $XMLLOC"
fi
# find the Doxygen tagfile
if [ \( "$WILLDOTAG" = "" \) -a \( ! -f $TAGFILE \) ]
then
WILLDOTAG="Cannot find Doxygen tagfile $TAGFILE"
fi
# if any XML processing to be done (Doxygen XML or tag file) then find xsltproc
XSLTCMD=`which xsltproc`
if [ \( \( "$WILLDOXML" != "" \) -o \( "$WILLDOTAG" != "" \) \) -a \( "$XSLTCMD" = "" \) ]
then
echo "Cannot do any additional processing; xsltproc command not found in path $PATH"
exit
fi
# process XML or explain why we're not
if [ "$WILLDOXML" = "" ]
then
# recreate cumulative file
XMLOUTPUT=Lurch-doxygen.xml.processed
if [ -f $XMLOUTPUT ]
then
rm $XMLOUTPUT
fi
touch $XMLOUTPUT
# fill it with data from several .xml files
for file in $XMLLOC/class_lob.xml $XMLLOC/class_lob_address.xml \
$XMLLOC/class_*_package.xml $XMLLOC/class_*_extension.xml \
$XMLLOC/class_user_action_tracker.xml
do
if [ ! -f $file ]
then
echo "Could not find this file to process: $file"
else
echo "Executing $XSLTCMD $XMLXSLT $file >> $XMLOUTPUT"
$XSLTCMD $XMLXSLT $file >> $XMLOUTPUT
fi
done
else
echo "Not processing XML: $WILLDOXML"
fi
# process the tagfile, if any
if [ "$WILLDOTAG" = "" ]
then
echo "Executing $XSLTCMD $TAGXSLT $TAGFILE > $TAGFILE.processed"
$XSLTCMD $TAGXSLT $TAGFILE > $TAGFILE.processed
else
echo "Not processing tagfile: $WILLDOTAG"
fi