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/g' \
30 # Create relative path from absolute directory $1 to absolute path $2
36 if [ -z "$src" -a -z "$dst" ]; then
37 echo "Internal error in relpath()" 1>&2
42 if [ "$srcd" = "$dstd" ]; then
43 src="${src#$srcd}"; src="${src#/}"
44 dst="${dst#$dstd}"; dst="${dst#/}"
49 rel="`echo "$src" | sed -e "s/[^\/]*/../g"`/$dst" # `"
53 # Log executed commands
63 do_html_cleanup <"${1}.orig" >"$1"
66 ###########################################################################
68 name="`basename "$0"`"; #`"
69 base="`dirname "$0"`"; base="`cd "$base"; pwd`" #`"
71 TEMP=`getopt -n $name -o '' -l html,tagfile,tagfile-name:,tagfiles:,output-dir:,html-dir: -- "$@"`
72 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
75 tagxsl="$base/tag-munge.xsl"
77 html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_dir="html"
84 tagfile="YES" ; shift ;;
86 tagfile_name="$2"; shift 2 ;;
89 f="`abspath "$f"`" #`"
90 tagfiles="$tagfiles${tagfiles:+ }$f"
95 output_dir="$2"; shift 2 ;;
97 html_dir="$2"; shift 2 ;;
101 echo "Internal error: $*"; exit 1 ;;
111 [--tagfile-name=<name>]
120 if [ "$tagfile" = "YES" -a -z "$tagfile_name" ]; then
121 echo "--tagfile-name is required with --tagfile"
127 if [ -f "$doxydir" ]; then
128 doxydir="`dirname "$doxydir"`" #`"
131 doxydir="`abspath "$doxydir"`" #`"
133 ###########################################################################
138 while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done
139 if [ ! -r "SConstruct" ]; then
140 echo "topdir not found"
144 reltopdir="`relpath "$doxydir/$output_dir/$html_dir" "$TOPDIR"`" #`"
148 ## Remove tagfile_name from list of tagfiles
150 if [ -n "$tagfile_name" ]; then
151 tagfile_name="`abspath "$output_dir/$tagfile_name"`" #`"
152 x="$tagfiles"; tagfiles=""
154 if [ "$f" != "$tagfile_name" ]; then
155 tagfiles="$tagfiles${tagfiles:+ }$f"
160 ## Call doxygen proper
163 if [ "$tagfile" = "YES" ]; then
164 generate_tagfile="$tagfile_name"
166 export TOPDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile
168 cmd ${DOXYGEN:-doxygen}
171 ## Clean up tagfile, if generated
173 if [ "$tagfile" = "YES" ]; then
174 mv "$tagfile_name" "${tagfile_name}.orig"
175 cmd xsltproc --novalid --nonet -o "$tagfile_name" "$tagxsl" "${tagfile_name}.orig"
181 if [ -n "$tagfiles" ]; then
183 for f in $tagfiles; do
184 n="`basename "$f"`" #`"
185 d="`dirname "$f"`" #`"
186 url="`relpath "$doxydir/$output_dir/$html_dir" "$d/$html_dir"`" #`"
187 args="$args${args:+ }-l $n@$url"
191 cd "./$output_dir/$html_dir"
192 cmd "./installdox" $args
197 ## Postprocess html files, if generated
199 if [ "$html" = "YES" ]; then
200 for h in "$doxydir/$output_dir/$html_dir"/*.html; do
201 cmd html_cleanup "$h"