X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=doclib%2FSConscript;h=9fbf7d9f0c18a0da6ae43741c8eb5d740271e953;hb=164fe477094d42463722584e527a02379ab5d985;hp=94dcdc911101c597a8318bcc40cd27c28906fbe4;hpb=8af98cc70ca47238d7ff9683c648e30df67c99a6;p=senf.git diff --git a/doclib/SConscript b/doclib/SConscript index 94dcdc9..9fbf7d9 100644 --- a/doclib/SConscript +++ b/doclib/SConscript @@ -1,9 +1,4 @@ # -*- python -*- - -# Some internal information on how the documentation is generated. All -# this is quite a mess, the complete documentation generation setup is -# in dire need of a complete redesign, but ... -# # # The documentation generation process is tightly integrated with the # scons build framework: @@ -12,17 +7,13 @@ # dependencies. This happens in the doxygen builder in # senfscons/Doxygen.py. # -# * possibly the doclib/doxy-header.html and/or -# doclib/doxy-footer.html files are regenerated +# * the doclib/doxy-header.html and/or doclib/doxy-footer.html files +# are regenerated # # * If any documentation is out-of-date with respect to it's source # files, the documentation is regenerated. # -# * When building the complete documentation ('all_docs'), the -# cross-reference page will be rebuilt if necessary (The global list -# of 'Open Issues'). -# -# * To fix some link errors, the additional 'linlint' and 'fixlinks' +# * To fix some link errors, the additional 'linklint' and 'fixlinks' # targets are used # # @@ -48,11 +39,7 @@ # 2. Regenerating header and/or footer # # If needed, the doxy-header.html and/or doxy-footer.html file will be -# regenerated. The dependencies are *not* complete, just adding a new -# subdirectory sadly does not automatically update the header (which -# contains the menu) -# -# The header and/or footer are written are generated from templates +# regenerated. The header and/or footer are generated from templates # using a simple python based templating system called yaptu which is # included in doclib/. # @@ -60,14 +47,12 @@ # 3. Calling doxygen # # The doxygen call itself is quite complex since there is some pre- -# and post-processing going on. We can separate this step into tree -# parts +# and post-processing going on. We can separate this step into two +# steps # # * Building prerequisites (e.g. images) # -# * The processing done by the Doxygen builder -# -# * Additional processing added by the SENFSCons.Doxygen helper. +# * The processing done by the Doxygen builder and doclib/doxygen.sh # # # 3.1. Building prerequisites @@ -78,16 +63,34 @@ # # 3.2. The main doxygen build (Doxygen builder) # -# * doxygen proper is called -# -# * doxygen is configured in Doxyfile.global to call -# 'doclib/filter.pl' on each source file. This filter will strip -# excess whitespace from the beginning of lines in '\code' and -# '
' blocks. Additionally it will expand all tabs, tab width is -# 8 spaces (there should be no tabs in the source but ...) +# The Doxygen builder will call the doxygen command to build the +# documentation. +# +# The doxygen command is configured as 'doclib/doxygen.sh' which +# does some additional processing in addition to calling doxygen +# proper +# +# * it sets environment variables depending on command line arguments. +# These variables are then used in the Doxyfile's +# +# * after doxygen is finished, 'installdox' is called to resolve +# tag file references. +# +# * the HTML documentation is post-processed using some sed, tidy, and +# an XSLT template +# +# * a generated tag file is post-processed using an XSLT template +# +# (see doclib/doxygen.sh for more information). The Doxygen +# configuration is set up such, that +# +# * doxygen calls 'doclib/filter.pl' on each source file. This filter +# will strip excess whitespace from the beginning of lines in +# '\code' and '' blocks. Additionally it will expand all tabs, +# tab width is 8 spaces (there should be no tabs in the source but +# ...) # -# * doxygen is configured in Doxyfile.global to call 'doclib/dot' to -# generate the 'dot' images. +# * doxygen calls 'doclib/dot' to generate the 'dot' images. # # * 'doclib/dot' calls 'doclib/dot-munge.pl' on the .dot # files. dot-munge.pl changes the font and font-size and adds @@ -98,45 +101,8 @@ # the oposite rank direction (top-bottom vs. left-right). The image # with the smaller width is selected and returned. # -# * after doxygen is finished, the list of referenced tag-files is -# checked. For each tag file the directory is found, where the -# documentation is generated (by scanning the Doxyfile which is -# repsonsible for building the tag file). For every tag file, the -# correct 'installdox' command is generated. -# -# * The stamp files are created -# -# -# 3.3. Postprocessing # -# The following steps are mostly added to work around some stupid -# doxygen problems -# -# * If a tag file is generated, 'senfscons/tagmunge.xsl' is called on the -# tag file. This XSLT stylesheet removes all namespace components -# from the tag file. Without this task, doxygen will completely barf -# when two different documentation parts have members in the same -# namespace. -# -# * All html files are processed by 'doclib/html-munge.xsl'. However, -# since the documentation generated by doxygen is completely invalid -# html we need to preprocess the html files with a simple 'sed' -# script and 'tidy' before 'xsltproc' even accepts the html code. -# -# * We use the generated xml output of doxygen to generate an XML -# fragment for the global cross reference. This fragment is -# generated by 'senfscons/xrefxtract.xslt' -# -# -# 4. Building the global cross-reference -# -# The global cross reference is built from the cross-refernce -# fragments generated for each of the documentation parts and from the -# doxy-header.html/doxy-footer.html files. This conversion is -# controlled by the 'senfscons/xrefhtml.xslt' stylesheet. -# -# -# 5. Fixing broken links +# 4. Fixing broken links # # After the documentation has been generated, additional calls first # to the 'linklint' and then to the 'fixlinks' target will try to fix @@ -151,7 +117,7 @@ Import('env') -import SENFSCons +import SENFSCons, datetime, os ########################################################################### @@ -216,7 +182,10 @@ def indices(): if doc.name == "search.idx" ] def writeTemplate(target = None, source = None, env = None): - file(target[0].abspath,"w").write(yaptu.process(str(env['TEMPLATE']), globals(), env.Dictionary())) + file(target[0].abspath,"w").write(processTemplate(env)) + +def processTemplate(env): + return yaptu.process(str(env['TEMPLATE']), globals(), env.Dictionary()) writeTemplate = env.Action(writeTemplate, varlist = [ 'TEMPLATE' ]) @@ -263,7 +232,6 @@ div.tabs li.$projectname a { background-color: #EDE497; }