summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-05-31 12:17:33 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-05-31 13:56:25 +0200
commitf89e390fbc6e4f3d8269c40ccab7c718bfcd394f (patch)
tree867d9d049d645dfa1867ff4940d54bdd499092d1 /buildtools
parentf98bb7ffc33bf161caf301c50c55c8e3cc858b85 (diff)
downloadsamba-f89e390fbc6e4f3d8269c40ccab7c718bfcd394f.tar.gz
samba-f89e390fbc6e4f3d8269c40ccab7c718bfcd394f.tar.bz2
samba-f89e390fbc6e4f3d8269c40ccab7c718bfcd394f.zip
waf: Refactor manpage building code.
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py33
1 files changed, 15 insertions, 18 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 00ebe53514..01e2ce8f53 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -214,15 +214,7 @@ def SAMBA_LIBRARY(bld, libname, source,
bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
if manpages is not None and 'XSLTPROC' in bld.env:
- bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
- for m in manpages.split():
- source = m + '.xml'
- bld.SAMBA_GENERATOR(m,
- source=source,
- target=m,
- rule='${XSLTPROC} -o ${TGT} ${MAN_XSL} ${SRC}'
- )
- bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+ bld.MANPAGES(manpages)
Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
@@ -313,15 +305,7 @@ def SAMBA_BINARY(bld, binname, source,
bld.TARGET_ALIAS(subsystem_name, binname)
if manpages is not None and 'XSLTPROC' in bld.env:
- bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
- for m in manpages.split():
- source = m + '.xml'
- bld.SAMBA_GENERATOR(m,
- source=source,
- target=m,
- rule='${XSLTPROC} -o ${TGT} ${MAN_XSL} ${SRC}'
- )
- bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+ bld.MANPAGES(manpages)
Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY
@@ -826,6 +810,19 @@ def PKG_CONFIG_FILES(bld, pc_files, vnum=None):
Build.BuildContext.PKG_CONFIG_FILES = PKG_CONFIG_FILES
+def MANPAGES(bld, manpages):
+ '''build and install manual pages'''
+ bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+ for m in manpages.split():
+ source = m + '.xml'
+ bld.SAMBA_GENERATOR(m,
+ source=source,
+ target=m,
+ rule='${XSLTPROC} -o ${TGT} ${MAN_XSL} ${SRC}'
+ )
+ bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+Build.BuildContext.MANPAGES = MANPAGES
+
#############################################################
# give a nicer display when building different types of files