X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=doclib%2FSConscript;h=cdb9cd689733ffa811468f9b028f7a02e9cd6204;hb=fa368bbbcb79a9aad8daf7cb25a9adee8270d1b8;hp=bb8c9986a335ac0b1416e7cfc74a529e2fb6c15d;hpb=2fbc9248049ba635a72b95267665cd0a85b1a9e6;p=senf.git diff --git a/doclib/SConscript b/doclib/SConscript index bb8c998..cdb9cd6 100644 --- a/doclib/SConscript +++ b/doclib/SConscript @@ -8,16 +8,56 @@ import SENFSCons import yaptu def modules(): + # Naja ... etwas rumgehackt aber was solls ... global EXTRA_MODULES - rv = [] - ix = len(env.Dir('#').abspath)+1 - ex = dict((env.Dir(p).abspath,True) for n,p in EXTRA_MODULES) + mods = {} + pathbase = len(env.Dir('#').abspath)+1 for module in env.Alias('all_docs')[0].sources: if module.name != 'html.stamp' : continue - if not ex.get(module.dir.abspath): - rv.append(('lib%s' % module.dir.dir.dir.name, module.dir.abspath[ix:])) - rv.sort() - return [ (name, env.Dir(path).abspath[ix:]) for name,path in EXTRA_MODULES ] + rv + mods[module.dir.dir.dir.abspath] = [ module.dir.dir.dir.name, + module.dir.abspath[pathbase:], + 0 ] + + rv = [] + keys = mods.keys() + keys.sort() + 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 + i += 1 + while i < len(rv) and mods[rv[i]][2] >= level: + i += 1 + rv[i:i] = [ mod ] + mods[mod][2] = 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(): ix = len(env.Dir('#').abspath)+1 @@ -69,6 +109,7 @@ div.tabs ul li.$projectname a { background-color: #EDE497; }
  • SVN ChangeLog
  • SENF @ BerliOS
  • Wiki
  • +
  • Home
  • ${TITLE}

    @@ -78,8 +119,8 @@ div.tabs ul li.$projectname a { background-color: #EDE497; }
    """ @@ -137,3 +178,13 @@ env.Alias('all_docs', env.Alias('all_docs', env.Command('search_paths.php', 'SConscript', writeTemplate, TEMPLATE = Literal(SEARCH_PATHS_PHP))) + +env.Alias('install_all', + env.Install( '$DOCINSTALLDIR/doclib', [ 'favicon.ico', + 'logo-head.png', + 'search.php', + 'search_functions.php', + 'search_paths.php', + 'senf.css' ] )) + +env.Clean('all', 'doxy-header.html') # I should not need this but I do ...