[rtems-docs commit] waf: Add a title to the XML Catalogue.

Chris Johns chrisj at rtems.org
Tue Jan 10 11:34:53 UTC 2017


Module:    rtems-docs
Branch:    master
Commit:    9aa52b9130e20f8ccb8588c05001cc960f8e9039
Changeset: http://git.rtems.org/rtems-docs/commit/?id=9aa52b9130e20f8ccb8588c05001cc960f8e9039

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Jan 10 22:34:47 2017 +1100

waf: Add a title to the XML Catalogue.

---

 common/waf.py |  7 ++++++-
 wscript       | 19 +++++++++++--------
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/common/waf.py b/common/waf.py
index 9b4b1dc..8aeac5d 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -313,7 +313,7 @@ def cmd_configure_path(ctx):
 
     cmd_configure(ctx)
 
-def xml_catalogue(ctx, building):
+def xml_catalogue(ctx, building, title):
     #
     # The following is a hack to find the top_dir because the task does
     # provided a reference to top_dir like a build context.
@@ -353,6 +353,11 @@ def xml_catalogue(ctx, building):
     root.setAttribute('date', 'today')
     cat.appendChild(root)
 
+    heading = cat.createElement('catalogue')
+    text = cat.createTextNode(title)
+    heading.appendChild(text)
+    root.appendChild(heading)
+
     builds = ['html']
     if ctx.env.BUILD_PDF == 'yes':
         builds += ['pdf']
diff --git a/wscript b/wscript
index eff1113..8cc4ee7 100644
--- a/wscript
+++ b/wscript
@@ -9,17 +9,19 @@ path.append(abspath('common'))
 import waflib
 import waf as docs_waf
 
-build_all = ['bsp-howto',
+version = 'Master (4.11.99)'
+
+build_all = ['user',
+             'rsb',
              'c-user',
-             'cpu-supplement',
-             'develenv',
-             'eclipse',
+             'bsp-howto',
+             'posix-users',
              'filesystem',
              'networking',
-             'posix-users',
-             'rsb',
              'shell',
-             'user']
+             'cpu-supplement',
+             'develenv',
+             'eclipse']
 
 building = build_all
 
@@ -32,7 +34,7 @@ def configure(conf):
     conf.env['BUILD_FROM_TOP'] = 'yes'
 
 def catalogue(ctx):
-    docs_waf.xml_catalogue(ctx, building)
+    docs_waf.xml_catalogue(ctx, building, version)
 
 def build(ctx):
     for b in building:
@@ -40,6 +42,7 @@ def build(ctx):
     ctx(rule = catalogue,
         target = 'catalogue.xml',
         source = ['wscript', 'common/waf.py'])
+    ctx.install_files('${PREFIX}', 'catalogue.xml')
 
 def install(ctx):
     for b in building:




More information about the vc mailing list