mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-build: Generate pre-built documentation in wscript itself
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
parent
27bd4c9eeb
commit
c7c2f15883
@ -1,23 +0,0 @@
|
||||
DOCS = ctdb.1 ctdb.1.html \
|
||||
ctdb_diagnostics.1 ctdb_diagnostics.1.html \
|
||||
ctdbd.1 ctdbd.1.html \
|
||||
ctdbd_wrapper.1 ctdbd_wrapper.1.html \
|
||||
onnode.1 onnode.1.html \
|
||||
ltdbtool.1 ltdbtool.1.html \
|
||||
ping_pong.1 ping_pong.1.html \
|
||||
ctdbd.conf.5 ctdbd.conf.5.html \
|
||||
ctdb.7 ctdb.7.html \
|
||||
ctdb-statistics.7 ctdb-statistics.7.html \
|
||||
ctdb-etcd.7 ctdb-etcd.7.html \
|
||||
ctdb-tunables.7 ctdb-tunables.7.html
|
||||
|
||||
all: $(DOCS)
|
||||
|
||||
%: %.xml
|
||||
xsltproc -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||
|
||||
%.html: %.xml
|
||||
xsltproc -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
|
||||
|
||||
distclean:
|
||||
rm -f $(DOCS)
|
21
ctdb/wscript
21
ctdb/wscript
@ -891,13 +891,24 @@ def dist():
|
||||
sys.exit(ret)
|
||||
samba_dist.DIST_FILES('ctdb/%s:%s' % (t, t), extend=True)
|
||||
|
||||
cmd = 'make -C doc'
|
||||
ret = samba_utils.RUN_COMMAND(cmd)
|
||||
if ret != 0:
|
||||
print('Command "%s" failed with exit status %d' % (cmd, ret))
|
||||
sys.exit(ret)
|
||||
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
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user