summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-02-21 22:30:30 +1100
committerMartin Schwenke <martins@samba.org>2017-02-23 15:31:08 +0100
commit5005362122700ba3651b2c0c58f9026d415d031e (patch)
tree8dd7b0b8136119c0b786f666f0888a62397f7ea4 /ctdb
parent646917ec078de25bcc9d68f7dc966eefed44353f (diff)
downloadsamba-5005362122700ba3651b2c0c58f9026d415d031e.tar.gz
ctdb-build: Split dist() target to generate manpages separately
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12595 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/wscript44
1 files changed, 27 insertions, 17 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index 02331499636..78319ecd1ad 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -957,7 +957,27 @@ def show_version(ctx):
print VERSION
-def dist():
+def manpages(ctx):
+ BASE_URL = 'http://docbook.sourceforge.net/release/xsl/current'
+ MAN_XSL = '%s/manpages/docbook.xsl' % BASE_URL
+ HTML_XSL = '%s/html/docbook.xsl' % BASE_URL
+ CMD_TEMPLATE = 'xsltproc --xinclude -o %s --nonet %s %s'
+ manpages = manpages_binary + manpages_misc + manpages_etcd + manpages_ceph
+ for t in manpages:
+ cmd = CMD_TEMPLATE % ('doc/%s' % t, MAN_XSL, 'doc/%s.xml' % t)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('Command %s failed with exit status %d' % (cmd, ret))
+ sys.exit(ret)
+
+ cmd = CMD_TEMPLATE % ('doc/%s.html' % t, HTML_XSL, 'doc/%s.xml' % t)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('Command %s failed with exit status %d' % (cmd, ret))
+ sys.exit(ret)
+
+
+def distonly(ctx):
samba_dist.DIST_FILES('VERSION:VERSION', extend=True)
t = 'include/ctdb_version.h'
@@ -979,24 +999,8 @@ def dist():
sys.exit(ret)
samba_dist.DIST_FILES('ctdb/%s:%s' % (t, t), extend=True)
- BASE_URL = 'http://docbook.sourceforge.net/release/xsl/current'
- MAN_XSL = '%s/manpages/docbook.xsl' % BASE_URL
- HTML_XSL = '%s/html/docbook.xsl' % BASE_URL
- CMD_TEMPLATE = 'xsltproc --xinclude -o %s --nonet %s %s'
manpages = manpages_binary + manpages_misc + manpages_etcd + manpages_ceph
for t in manpages:
- cmd = CMD_TEMPLATE % ('doc/%s' % t, MAN_XSL, 'doc/%s.xml' % t)
- ret = samba_utils.RUN_COMMAND(cmd)
- if ret != 0:
- print('Command %s failed with exit status %d' % (cmd, ret))
- sys.exit(ret)
-
- cmd = CMD_TEMPLATE % ('doc/%s.html' % t, HTML_XSL, 'doc/%s.xml' % t)
- ret = samba_utils.RUN_COMMAND(cmd)
- if ret != 0:
- print('Command %s failed with exit status %d' % (cmd, ret))
- sys.exit(ret)
-
samba_dist.DIST_FILES('ctdb/doc/%s:doc/%s' % (t, t), extend=True)
samba_dist.DIST_FILES('ctdb/doc/%s.html:doc/%s.html' % (t, t),
extend=True)
@@ -1004,6 +1008,12 @@ def dist():
samba_dist.dist()
+def dist():
+ import Scripting
+ Scripting.commands.append('manpages')
+ Scripting.commands.append('distonly')
+
+
def rpmonly(ctx):
opts = os.getenv('RPM_OPTIONS') or ''
cmd = 'rpmbuild -ta --clean --rmsource %s ctdb-%s.tar.gz' % (opts, VERSION)