waf: Create catalog file for manpage generation.
authorAndreas Schneider <asn@samba.org>
Thu, 6 Sep 2012 10:14:46 +0000 (12:14 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 7 Sep 2012 08:48:57 +0000 (10:48 +0200)
buildtools/wafsamba/wafsamba.py
wscript_build

index 64624d7..50c3f36 100644 (file)
@@ -774,13 +774,14 @@ Build.BuildContext.INSTALL_DIRS = INSTALL_DIRS
 def MANPAGES(bld, manpages):
     '''build and install manual pages'''
     bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+    os.environ["XML_CATALOG_FILES"] = 'file:///etc/xml/catalog file://' + bld.srcnode.abspath() + '/bin/default/docs-xml/build/catalog.xml'
     for m in manpages.split():
         source = m + '.xml'
         bld.SAMBA_GENERATOR(m,
                             source=source,
                             target=m,
                             group='final',
-                            rule='${XSLTPROC} -o ${TGT} --nonet ${MAN_XSL} ${SRC}'
+                            rule='${XSLTPROC} --xinclude -o ${TGT} --nonet ${MAN_XSL} ${SRC}'
                             )
         bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
 Build.BuildContext.MANPAGES = MANPAGES
index b671699..8c96b5c 100755 (executable)
@@ -143,3 +143,7 @@ bld.RECURSE('testsuite/headers')
 
 bld.SYMBOL_CHECK()
 bld.DUP_SYMBOL_CHECK()
+
+bld.env.ABS_TOP_BUILDDIR = bld.srcnode.abspath() + '/docs-xml'
+bld.CONFIGURE_FILE('docs-xml/build/catalog.xml',
+                   ABS_TOP_BUILDDIR = bld.env.ABS_TOP_BUILDDIR)