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 name="`basename "$0"`"; #`"
15 base="`dirname "$0"`"; base="`cd "$base"; pwd`" #`"
17 TEMP=`getopt -n $name -o '' -l html,tagfile,tagfile-name:,tagfiles:,output-dir:,html-dir: -- "$@"`
18 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
21 tagxsl="$base/tag-munge.xsl"
23 html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_dir="html"
30 tagfile="YES" ; shift ;;
32 tagfile_name="$2"; shift 2 ;;
35 f="`readlink -mn "$f"`" #`"
36 tagfiles="$tagfiles${tagfiles:+ }$f"
41 output_dir="$2"; shift 2 ;;
43 html_dir="$2"; shift 2 ;;
47 echo "Internal error: $*"; exit 1 ;;
57 [--tagfile-name=<name>]
66 if [ "$tagfile" = "YES" -a -z "$tagfile_name" ]; then
67 echo "--tagfile-name is required with --tagfile"
73 if [ -f "$doxydir" ]; then
74 doxydir="`dirname "$doxydir"`" #`"
77 doxydir="`readlink -mn "$doxydir"`" #`"
79 ###########################################################################
81 # Create relative path from absolute directory $1 to absolute path $2
89 if [ "$srcd" = "$dstd" ]; then
90 src="${src#$srcd}"; src="${src#/}"
91 dst="${dst#$dstd}"; dst="${dst#/}"
96 rel="`echo "$src" | sed -e "s/[^\/]*/../g"`/$dst" # `"
100 # Log executed commands
110 do_html_cleanup <"${1}.orig" >"$1"
113 ###########################################################################
118 while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done
119 if [ ! -r "SConstruct" ]; then
120 echo "topdir not found"
124 reltopdir="`relpath "$doxydir/$output_dir/$html_dir" "$TOPDIR"`" #`"
128 ## Remove tagfile_name from list of tagfiles
130 if [ -n "$tagfile_name" ]; then
131 tagfile_name="`readlink -mn "$output_dir/$tagfile_name"`" #`"
132 x="$tagfiles"; tagfiles=""
134 if [ "$f" != "$tagfile_name" ]; then
135 tagfiles="$tagfiles${tagfiles:+ }$f"
140 ## Call doxygen proper
143 if [ "$tagfile" = "YES" ]; then
144 generate_tagfile="$tagfile_name"
146 export TOPDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile
148 cmd ${DOXYGEN:-doxygen}
151 ## Clean up tagfile, if generated
153 if [ "$tagfile" = "YES" ]; then
154 mv "$tagfile_name" "${tagfile_name}.orig"
155 cmd xsltproc --novalid --nonet -o "$tagfile_name" "$tagxsl" "${tagfile_name}.orig"
161 if [ -n "$tagfiles" ]; then
163 for f in $tagfiles; do
164 n="`basename "$f"`" #`"
165 d="`dirname "$f"`" #`"
166 url="`relpath "$doxydir/$output_dir/$html_dir" "$d/$html_dir"`" #`"
167 args="$args${args:+ }-l $n@$url"
171 cd "./$output_dir/$html_dir"
172 cmd "./installdox" $args
177 ## Postprocess html files, if generated
179 if [ "$html" = "YES" ]; then
180 for h in "$doxydir/$output_dir/$html_dir"/*.html; do
181 cmd html_cleanup "$h"