X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senfscons%2FSENFSCons.py;h=771d4fadad223a6172cf51bcedbd21d2061db273;hb=d0006132bfcb3ab442cf66b600ed3fad36f1ac2c;hp=d2e0c488248961ba040efb9e3c8c1bca79c26cfc;hpb=70256cc93f59f5d2c9b3428775a181e5e225bfc5;p=senf.git diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index d2e0c48..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" ]):