X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senfscons%2FSENFSCons.py;h=771d4fadad223a6172cf51bcedbd21d2061db273;hb=a8a6c2992968ee32cbc0244851e25b57a03a323a;hp=91bac5b7a7db6a56514b1f551ccb29d265361b95;hpb=f4e0d3d4a32cc0bfc37855ad7f2c1e829911d233;p=senf.git diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index 91bac5b..771d4fa 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -151,11 +151,13 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # ||| WITHIN THE DOXYGEN BUILDER docs = env.Doxygen(doxyfile)[:] xmlnode = None + htmlnode = None tagnode = None for doc in docs: if isinstance(doc,SCons.Node.FS.Dir): continue if doc.name == 'xml.stamp' : xmlnode = doc - if os.path.splitext(doc.name)[1] == '.stamp' : continue # file stamp + if doc.name == 'html.stamp' : htmlnode = doc + if os.path.splitext(doc.name)[1] == '.stamp' : continue # ignore other file stamps # otherwise it must be the tag file tagnode = doc @@ -164,10 +166,27 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # references env.AddPostAction( docs, - env.Action("xsltproc -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" + env.Action("xsltproc --nonet -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" % { 'target': tagnode.abspath, 'template': os.path.join(basedir,"tagmunge.xsl") })) + if htmlnode and env.get('DOXY_HTML_XSL'): + xslfile = env.File(env['DOXY_HTML_XSL']) + env.AddPostAction( + docs, + env.Action(("for html in %s/*.html; do " + + " echo $$html;" + + " sed -e 's/id=\"current\"/class=\"current\"/' $${html}" + + " | tidy -ascii -q --show-warnings no --fix-uri no" + + " | xsltproc --nonet --html -o $${html}.new %s - 2>&1" + + " | grep '^-'" + + " | grep -v 'ID .* already defined';" + + " mv $${html}.new $${html}; " + + "done") + % (htmlnode.dir.abspath, xslfile.abspath))) + for doc in docs: + env.Depends(doc,xslfile) + if xmlnode: xrefs = [] for type in env.get("DOXY_XREF_TYPES",[ "bug", "todo" ]): @@ -218,7 +237,8 @@ def DoxyXRef(env, docs=None, "sed -e 's/\\$$title/$TITLE/g' -e 's/\\$$projectname/Overview/g' ${SOURCES[%d]} >> $TARGET" % (HTML_HEADER and 3 or 2)) - xref = env.Command("doc/html/xref.html", sources, commands) + xref = env.Command("doc/html/xref.html", sources, commands, + TITLE = TITLE) env.Alias('all_docs',xref) return xref