diff options
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/wscript | 44 |
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) |