5 sed -e 's/id="current"/class="current"/' \
6 | tidy -ascii -q --wrap 0 --show-warnings no --fix-uri no \
7 | sed -e 's/name="\([^"]*\)"\([^>]*\) id="\1"/name="\1"\2/g' \
8 -e 's/id="\([^"]*\)"\([^>]*\) name="\1"/name="\1"\2/g' \
9 -e 's/\(<area shape="rect"\) id="[^"]*"/\1/g' \
10 -e 's/<a name="member-group"><\/a>//g' \
11 | xsltproc --novalid --nonet --html --stringparam topdir "$reltopdir" \
12 "$base/html-munge.xsl" -
15 ###########################################################################
17 # Build absolute, normalized pathname
26 -e 's/\/\.\(\/\|$\)/\1/g' \
29 -e 's/\/[^\/]*\/..\(\/\|$\)/\1/' \
31 -e 's/^\(\/..\)*\(\/\|$\)/\2/' \
35 # Create relative path from absolute directory $1 to absolute path $2
38 local src="`abspath "$1"`" # `"
39 local dst="`abspath "$2"`" # `"
43 if [ -z "$src" -a -z "$dst" ]; then
44 echo "Internal error in relpath()" 1>&2
49 if [ "$srcd" = "$dstd" ]; then
50 src="${src#$srcd}"; src="${src#/}"
51 dst="${dst#$dstd}"; dst="${dst#/}"
56 rel="`echo "$src" | sed -e "s/[^\/]*/../g"`/$dst" # `"
60 # Log executed commands
70 do_html_cleanup <"${1}.orig" >"$1"
73 ###########################################################################
75 name="`basename "$0"`"; #`"
76 base="`dirname "$0"`"; base="`cd "$base"; pwd`" #`"
79 TEMP=`getopt -n $name -o '' -l html,tagfile,tagfile-name:,tagfiles:,output-dir:,html-dir: -- "$@"`
80 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
83 tagxsl="$base/tag-munge.xsl"
85 html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_dir="html"
92 tagfile="YES" ; shift ;;
94 tagfile_name="$2"; shift 2 ;;
97 f="`abspath "$f"`" #`"
98 tagfiles="$tagfiles${tagfiles:+ }$f"
103 output_dir="$2"; shift 2 ;;
105 html_dir="$2"; shift 2 ;;
109 echo "Internal error: $*"; exit 1 ;;
119 [--tagfile-name=<name>]
128 if [ "$tagfile" = "YES" -a -z "$tagfile_name" ]; then
129 echo "--tagfile-name is required with --tagfile"
135 if [ -f "$doxydir" ]; then
136 doxydir="`dirname "$doxydir"`" #`"
139 doxydir="`abspath "$doxydir"`" #`"
141 ###########################################################################
145 if [ -z "$TOPDIR" ]; then
147 while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done
148 if [ ! -r "SConstruct" ]; then
149 echo "topdir not found"
155 reltopdir="`relpath "$doxydir/$output_dir/$html_dir" "$TOPDIR"`" #`"
159 ## Remove tagfile_name from list of tagfiles
161 if [ -n "$tagfile_name" ]; then
162 tagfile_name="`abspath "$output_dir/$tagfile_name"`" #`"
163 x="$tagfiles"; tagfiles=""
165 if [ "$f" != "$tagfile_name" ]; then
166 tagfiles="$tagfiles${tagfiles:+ }$f"
171 ## Remove empty tagfiles from list of tagfiles
173 x="$tagfiles"; tagfiles=""
176 tagfiles="$tagfiles${tagfiles:+ }$f"
180 ## Call doxygen proper
183 if [ "$tagfile" = "YES" ]; then
184 generate_tagfile="$tagfile_name"
186 export TOPDIR LIBDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile
189 cmd ${DOXYGEN:-doxygen}
192 ## Clean up tagfile, if generated
194 if [ "$tagfile" = "YES" ]; then
195 mv "$tagfile_name" "${tagfile_name}.orig"
196 cmd xsltproc --novalid --nonet -o "$tagfile_name" "$tagxsl" "${tagfile_name}.orig"
202 if [ -n "$tagfiles" ]; then
204 for f in $tagfiles; do
205 n="`basename "$f"`" #`"
206 d="`dirname "$f"`" #`"
207 url="`relpath "$doxydir/$output_dir/$html_dir" "$d/$html_dir"`" #`"
208 args="$args${args:+ }-l $n@$url"
212 cd "./$output_dir/$html_dir"
213 cmd "./installdox" $args
218 ## Postprocess html files, if generated
220 if [ "$html" = "YES" ]; then
221 for h in "$doxydir/$output_dir/$html_dir"/*.html; do
222 cmd html_cleanup "$h"