X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=doclib%2FSConscript;h=39280f57a9093b97cde21daa2cf7939f37d13deb;hb=309d78606f59617de0cfb1469b22111c846891ad;hp=ab5a009d0279dc55a60efacaf84f0b4c62626768;hpb=7746a408cc69f62722ce87c35dab1cabe03d7626;p=senf.git diff --git a/doclib/SConscript b/doclib/SConscript index ab5a009..39280f5 100644 --- a/doclib/SConscript +++ b/doclib/SConscript @@ -39,13 +39,9 @@ # 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/. +# included in site_scons/lib/. # # # 3. Calling doxygen @@ -56,7 +52,8 @@ # # * Building prerequisites (e.g. images) # -# * The processing done by the Doxygen builder and doclib/doxygen.sh +# * The processing done by the Doxygen builder and +# site_scon/lib/doxygen.sh # # # 3.1. Building prerequisites @@ -70,7 +67,7 @@ # The Doxygen builder will call the doxygen command to build the # documentation. # -# The doxygen command is configured as 'doclib/doxygen.sh' which +# The doxygen command is configured as 'site_scon/lib/doxygen.sh' which # does some additional processing in addition to calling doxygen # proper # @@ -85,25 +82,30 @@ # # * a generated tag file is post-processed using an XSLT template # -# (see doclib/doxygen.sh for more information). The Doxygen +# (see site_scon/lib/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 +# * doxygen calls 'site_scons/lib/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 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 +# * 'site_scons/lib/filter.pl' calls 'site_scons/lib/makeDiaImageMap.py' +# whenever finding a '\diaimage' command. This will create an image +# map (in an encoded form which will be fixed by html-munge.xsl +# later) +# +# * doxygen calls 'site_scons/lib/dot' to generate the 'dot' images. +# +# * 'site_scons/lib/dot' calls 'site_scons/lib/dot-munge.pl' on the +# .dot files. dot-munge.pl changes the font and font-size and adds # line-breaks to long labels # -# * 'doclib/dot' calls the real dot binary. If the resulting image is -# more than 800 pixels wide, dot is called again, this time using -# the oposite rank direction (top-bottom vs. left-right). The image -# with the smaller width is selected and returned. +# * 'site_scons/lib/dot' calls the real dot binary. If the resulting +# image is more than 800 pixels wide, dot is called again, this time +# using the oposite rank direction (top-bottom vs. left-right). The +# image with the smaller width is selected and returned. # # # 4. Fixing broken links @@ -121,7 +123,7 @@ Import('env') -import SENFSCons +import SENFSCons, datetime, os ########################################################################### @@ -131,11 +133,14 @@ def modules(): # Naja ... etwas rumgehackt aber was solls ... global EXTRA_MODULES mods = {} - pathbase = len(env.Dir('#').abspath)+1 + pathbase = env.Dir('#/senf').abspath + pathbasel = len(pathbase)+1 for module in env.Alias('all_docs')[0].sources: if module.name != 'html.stamp' : continue - mods[module.dir.dir.dir.abspath] = [ module.dir.dir.dir.name, - module.dir.abspath[pathbase:], + if not module.dir.dir.dir.abspath.startswith(pathbase): continue + mods[module.dir.dir.dir.abspath] = [ module.dir.dir.dir.abspath[pathbasel:].replace('/','_'), + module.dir.dir.dir.name, + module.dir.abspath[pathbasel:], 0 ] rv = [] @@ -144,39 +149,18 @@ def modules(): for mod in keys: i = 0 while i < len(rv): - if len(rv[i]) > pathbase and mod.startswith(rv[i] + '/'): - level = mods[rv[i]][2] + 1 + if len(rv[i]) > pathbasel and mod.startswith(rv[i] + '/'): + level = mods[rv[i]][-1] + 1 i += 1 while i < len(rv) and mods[rv[i]][2] >= level: i += 1 rv[i:i] = [ mod ] - mods[mod][2] = level + mods[mod][-1] = level break i += 1 if i == len(rv): rv.append(mod) - for mod in keys: - if mods[mod][2] == 0: - mods[mod][0] = 'lib' + mods[mod][0] - - n = 0 - for name,path in EXTRA_MODULES: - path = env.Dir(path).dir.dir.abspath - i = 0 - while i < len(rv): - if rv[i] == path: - mods[rv[i]][0] = name - m = 1 - while i+m < len(rv) and mods[rv[i+m]][2] > mods[rv[i]][2]: - m += 1 - rv[n:n] = rv[i:i+m] - rv[i+m:i+2*m] = [] - i += m - n += m - else: - i += 1 - return ( tuple(mods[mod]) for mod in rv ) def indices(): @@ -186,20 +170,15 @@ 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' ]) ########################################################################### -# Extra documentation modules which are handled (named) different from -# library modules -EXTRA_MODULES = [ - ('Overview', '#/doc/html'), - ('Examples', '#/Examples/doc/html'), - ('HowTos', '#/HowTos/doc/html'), - ('SENFSCons', '#/senfscons/doc/html') ] - HEADER = """ @@ -233,7 +212,6 @@ div.tabs li.$projectname a { background-color: #EDE497; }