mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
waf: Refactor manpage building code.
This commit is contained in:
parent
f98bb7ffc3
commit
f89e390fbc
@ -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
|
||||
|
@ -169,7 +169,7 @@ def build(bld):
|
||||
cflags='-DLDB_MODULESDIR=\"%s\"' % modules_dir,
|
||||
abi_file=abi_file,
|
||||
abi_match='!ldb_*module_ops !ldb_*backend_ops ldb_*',
|
||||
vnum=VERSION, manpages='man/ldb3.')
|
||||
vnum=VERSION, manpages='man/ldb.3')
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE',
|
||||
'tools/ldbutil.c tools/cmdline.c',
|
||||
@ -177,10 +177,12 @@ def build(bld):
|
||||
|
||||
LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
|
||||
for t in LDB_TOOLS.split():
|
||||
bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='LIBLDB_CMDLINE', manpages='man/%s.1' % t)
|
||||
bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='LIBLDB_CMDLINE',
|
||||
manpages='man/%s.1' % t)
|
||||
|
||||
# ldbtest doesn't get installed
|
||||
bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='LIBLDB_CMDLINE', install=False)
|
||||
bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='LIBLDB_CMDLINE',
|
||||
install=False)
|
||||
|
||||
bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
|
||||
deps='ldb',
|
||||
|
Loading…
Reference in New Issue
Block a user