X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=site_scons%2Flib%2Fdoxygen.sh;h=7815ceaf9b720784ccb4991014e431fe703abc16;hb=d5b4cca5714c2b44bbc476636a0774b4fcbd9151;hp=958a87b80fc91a47b053749df485f3e79997b4d8;hpb=42f4a13c65272fe04b84831dd3dee3c0be401ec7;p=senf.git diff --git a/site_scons/lib/doxygen.sh b/site_scons/lib/doxygen.sh index 958a87b..7815cea 100755 --- a/site_scons/lib/doxygen.sh +++ b/site_scons/lib/doxygen.sh @@ -5,6 +5,9 @@ do_html_cleanup() sed -e 's/id="current"/class="current"/' \ | tidy -ascii -q --wrap 0 --show-warnings no --fix-uri no \ | sed -e 's/name="\([^"]*\)"\([^>]*\) id="\1"/name="\1"\2/g' \ + -e 's/id="\([^"]*\)"\([^>]*\) name="\1"/name="\1"\2/g' \ + -e 's/\(<\/a>//g' \ | xsltproc --novalid --nonet --html --stringparam topdir "$reltopdir" \ "$base/html-munge.xsl" - } @@ -32,8 +35,10 @@ abspath() # Create relative path from absolute directory $1 to absolute path $2 relpath() { - local src="${1#/}" - local dst="${2#/}" + local src="`abspath "$1"`" # `" + local dst="`abspath "$2"`" # `" + src="${src#/}" + dst="${dst#/}" while true; do if [ -z "$src" -a -z "$dst" ]; then echo "Internal error in relpath()" 1>&2 @@ -137,13 +142,16 @@ doxydir="`abspath "$doxydir"`" #`" ## Find $TOPDIR -cd "$doxydir" -while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done -if [ ! -r "SConstruct" ]; then - echo "topdir not found" - exit 1; +if [ -z "$TOPDIR" ]; then + cd "$doxydir" + while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done + if [ ! -r "SConstruct" ]; then + echo "topdir not found" + exit 1; + fi + TOPDIR="`pwd`"; fi -TOPDIR="`pwd`"; + reltopdir="`relpath "$doxydir/$output_dir/$html_dir" "$TOPDIR"`" #`" cd "$doxydir" @@ -160,6 +168,15 @@ if [ -n "$tagfile_name" ]; then done fi +## Remove empty tagfiles from list of tagfiles + +x="$tagfiles"; tagfiles="" +for f in $x; do + if [ -s "$f" ]; then + tagfiles="$tagfiles${tagfiles:+ }$f" + fi +done + ## Call doxygen proper generate_tagfile="" @@ -168,6 +185,7 @@ if [ "$tagfile" = "YES" ]; then fi export TOPDIR LIBDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile +echo "+ cd $doxydir" cmd ${DOXYGEN:-doxygen}