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 | xsltproc --novalid --nonet --html --stringparam topdir "$reltopdir" \
9 "$base/html-munge.xsl" -
12 ###########################################################################
14 # Build absolute, normalized pathname
23 -e 's/\/\.\(\/\|$\)/\1/g' \
26 -e 's/\/[^\/]*\/..\(\/\|$\)/\1/' \
28 -e 's/^\(\/..\)*\(\/\|$\)/\2/' \
32 # Create relative path from absolute directory $1 to absolute path $2
38 if [ -z "$src" -a -z "$dst" ]; then
39 echo "Internal error in relpath()" 1>&2
44 if [ "$srcd" = "$dstd" ]; then
45 src="${src#$srcd}"; src="${src#/}"
46 dst="${dst#$dstd}"; dst="${dst#/}"
51 rel="`echo "$src" | sed -e "s/[^\/]*/../g"`/$dst" # `"
55 # Log executed commands
65 do_html_cleanup <"${1}.orig" >"$1"
68 ###########################################################################
70 name="`basename "$0"`"; #`"
71 base="`dirname "$0"`"; base="`cd "$base"; pwd`" #`"
74 TEMP=`getopt -n $name -o '' -l html,tagfile,tagfile-name:,tagfiles:,output-dir:,html-dir: -- "$@"`
75 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
78 tagxsl="$base/tag-munge.xsl"
80 html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_dir="html"
87 tagfile="YES" ; shift ;;
89 tagfile_name="$2"; shift 2 ;;
92 f="`abspath "$f"`" #`"
93 tagfiles="$tagfiles${tagfiles:+ }$f"
98 output_dir="$2"; shift 2 ;;
100 html_dir="$2"; shift 2 ;;
104 echo "Internal error: $*"; exit 1 ;;
114 [--tagfile-name=<name>]
123 if [ "$tagfile" = "YES" -a -z "$tagfile_name" ]; then
124 echo "--tagfile-name is required with --tagfile"
130 if [ -f "$doxydir" ]; then
131 doxydir="`dirname "$doxydir"`" #`"
134 doxydir="`abspath "$doxydir"`" #`"
136 ###########################################################################
141 while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done
142 if [ ! -r "SConstruct" ]; then
143 echo "topdir not found"
147 reltopdir="`relpath "$doxydir/$output_dir/$html_dir" "$TOPDIR"`" #`"
151 ## Remove tagfile_name from list of tagfiles
153 if [ -n "$tagfile_name" ]; then
154 tagfile_name="`abspath "$output_dir/$tagfile_name"`" #`"
155 x="$tagfiles"; tagfiles=""
157 if [ "$f" != "$tagfile_name" ]; then
158 tagfiles="$tagfiles${tagfiles:+ }$f"
163 ## Call doxygen proper
166 if [ "$tagfile" = "YES" ]; then
167 generate_tagfile="$tagfile_name"
169 export TOPDIR LIBDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile
171 cmd ${DOXYGEN:-doxygen}
174 ## Clean up tagfile, if generated
176 if [ "$tagfile" = "YES" ]; then
177 mv "$tagfile_name" "${tagfile_name}.orig"
178 cmd xsltproc --novalid --nonet -o "$tagfile_name" "$tagxsl" "${tagfile_name}.orig"
184 if [ -n "$tagfiles" ]; then
186 for f in $tagfiles; do
187 n="`basename "$f"`" #`"
188 d="`dirname "$f"`" #`"
189 url="`relpath "$doxydir/$output_dir/$html_dir" "$d/$html_dir"`" #`"
190 args="$args${args:+ }-l $n@$url"
194 cd "./$output_dir/$html_dir"
195 cmd "./installdox" $args
200 ## Postprocess html files, if generated
202 if [ "$html" = "YES" ]; then
203 for h in "$doxydir/$output_dir/$html_dir"/*.html; do
204 cmd html_cleanup "$h"