From: g0dil Date: Wed, 25 Apr 2007 15:32:00 +0000 (+0000) Subject: Add missing xref.html XSLT postprocessing X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=801aaf1479e7749b4b7e0de2dbe7a086cc4a4622;p=senf.git Add missing xref.html XSLT postprocessing git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@234 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/doclib/SConscript b/doclib/SConscript index ddaa95e..c3303e3 100644 --- a/doclib/SConscript +++ b/doclib/SConscript @@ -64,12 +64,22 @@ div.tabs ul li.$projectname a {obr} background-color: #EDE497; {cbr}
""" +OVERVIEW_EXTRA_HEADER=""" + """ + FOOTER = """
@@ -81,16 +91,6 @@ FOOTER = """
""" -OVERVIEW_EXTRA_HEADER=""" -
- -
""" - SEARCH_PHP=""" """ @@ -98,8 +98,8 @@ SEARCH_PHP=""" SEARCH_PATHS_PHP="""/dev/null' - + r'| sed -e "s/\[\[//g" > ${TARGET}.tmp', + + r'| sed -e "s/\[\[//g" > ${TARGET}.tmp', 'mv ${TARGET}.tmp ${TARGET}' ], TEMPLATE = (HEADER + OVERVIEW_EXTRA_HEADER - + SEARCH_PHP.replace('<','[[').replace('>',']]') + + SEARCH_PHP.replace('',']]') + FOOTER), TITLE = "Search results")) env.Alias('all_docs', diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index 10ca5f7..d87f229 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -450,14 +450,32 @@ def DoxyXRef(env, docs=None, commands = [] if HTML_HEADER: - commands.append( - "sed -e 's/\\$$title/$TITLE/g' -e 's/\\$$projectname/Overview/g' ${SOURCES[2]} > $TARGET") - commands.append("xsltproc --stringparam title '$TITLE' --stringparam types '$DOXY_XREF_TYPES' ${SOURCES[1]} $SOURCE >> $TARGET") + commands.append("sed" + + " -e 's/\\$$title/$TITLE/g'" + + " -e 's/\\$$projectname/Overview/g'" + + " ${SOURCES[2]} > $TARGET") + commands.append("xsltproc" + + " --stringparam title '$TITLE'" + + " --stringparam types '$DOXY_XREF_TYPES'" + + " ${SOURCES[1]} $SOURCE >> $TARGET") if HTML_FOOTER: commands.append( "sed -e 's/\\$$title/$TITLE/g' -e 's/\\$$projectname/Overview/g' ${SOURCES[%d]} >> $TARGET" % (HTML_HEADER and 3 or 2)) + if env.get('DOXY_HTML_XSL'): + xslfile = env.File(env['DOXY_HTML_XSL']) + reltopdir = '../' * len(xref[0].dir.abspath[len(env.Dir('#').abspath)+1:].split('/')) + if reltopdir : reltopdir = reltopdir[:-1] + else : reltopdir = '.' + commands.append(("xsltproc -o ${TARGET}.tmp" + + " --nonet --html" + + " --stringparam topdir %s" + + " ${SOURCES[-1]} $TARGET 2>/dev/null") + % reltopdir) + commands.append("mv ${TARGET}.tmp ${TARGET}") + sources.append(xslfile) + xref = env.Command("doc/html/xref.html", sources, commands, TITLE = TITLE)