Add manpages argument to SAMBA_LIBRARY().
authorJelmer Vernooij <jelmer@samba.org>
Mon, 31 May 2010 10:08:01 +0000 (12:08 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 31 May 2010 11:56:25 +0000 (13:56 +0200)
buildtools/wafsamba/wafsamba.py
lib/talloc/wscript
source4/lib/ldb/wscript

index 41b866d05ca1e2c6c7695d1340ee4d64a9882f64..00ebe5351416a7d7ac506a225785d2f349bbf5cc 100644 (file)
@@ -116,6 +116,7 @@ def SAMBA_LIBRARY(bld, libname, source,
                   abi_match=None,
                   hide_symbols=False,
                   is_bundled=False,
                   abi_match=None,
                   hide_symbols=False,
                   is_bundled=False,
+                  manpages=None,
                   enabled=True):
     '''define a Samba library'''
 
                   enabled=True):
     '''define a Samba library'''
 
@@ -196,7 +197,7 @@ def SAMBA_LIBRARY(bld, libname, source,
         vnum            = vnum,
         install_path    = None,
         samba_inst_path = install_path,
         vnum            = vnum,
         install_path    = None,
         samba_inst_path = install_path,
-        name           = libname,
+        name            = libname,
         samba_realname  = realname,
         samba_install   = install,
         abi_file        = abi_file,
         samba_realname  = realname,
         samba_install   = install,
         abi_file        = abi_file,
@@ -212,6 +213,18 @@ def SAMBA_LIBRARY(bld, libname, source,
     if pc_files is not None:
         bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
 
     if pc_files is not None:
         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)
+
+
 Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
 
 
 Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
 
 
index 61930f67e386324175783c3338193c3d226b346e..45886a553ebbeea2f00cf03e3897babb60d7de8e 100644 (file)
@@ -60,7 +60,8 @@ def build(bld):
                           abi_file='ABI/talloc-%s.sigs' % VERSION,
                           abi_match='talloc* _talloc*',
                           hide_symbols=True,
                           abi_file='ABI/talloc-%s.sigs' % VERSION,
                           abi_match='talloc* _talloc*',
                           hide_symbols=True,
-                          vnum=VERSION, is_bundled=True)
+                          vnum=VERSION, is_bundled=True, 
+                                                 manpages='talloc.3')
 
         # should we also install the symlink to libtalloc1.so here?
         bld.SAMBA_LIBRARY('talloc-compat1',
 
         # should we also install the symlink to libtalloc1.so here?
         bld.SAMBA_LIBRARY('talloc-compat1',
@@ -82,22 +83,6 @@ def build(bld):
         bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
         bld.INSTALL_FILES('${INCLUDEDIR}', 'talloc.h')
 
         bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
         bld.INSTALL_FILES('${INCLUDEDIR}', 'talloc.h')
 
-        if bld.env.XSLTPROC:
-            bld.env.TALLOC_MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
-            bld.env.TALLOC_WEB_XSL = 'http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl'
-            bld.SAMBA_GENERATOR('talloc.3',
-                                source='talloc.3.xml',
-                                target='talloc.3',
-                                rule='${XSLTPROC} -o ${TGT} ${TALLOC_MAN_XSL} ${SRC}'
-                                )
-            bld.SAMBA_GENERATOR('talloc.3.html',
-                                source='talloc.3.xml',
-                                target='talloc.3.html',
-                                rule='${XSLTPROC} -o ${TGT} ${TALLOC_WEB_XSL} ${SRC}'
-                                )
-            bld.INSTALL_FILES('${MANDIR}/man3', 'talloc.3')
-
-
 def test(ctx):
     '''run talloc testsuite'''
     import Utils
 def test(ctx):
     '''run talloc testsuite'''
     import Utils
index 15740d6b744b88c608fa40bdf5cb2c57912d53c0..61fe9cbe402e283c77d6f5542d74edf9951291f0 100644 (file)
@@ -163,12 +163,13 @@ def build(bld):
                           COMMON_SRC + ' ' + LDB_MAP_SRC,
                           deps=ldb_deps,
                           includes='include',
                           COMMON_SRC + ' ' + LDB_MAP_SRC,
                           deps=ldb_deps,
                           includes='include',
-                          public_headers='include/ldb.h include/ldb_errors.h',
+                          public_headers='include/ldb.h include/ldb_errors.h '\
+                                                                        'include/ldb_module.h',
                           pc_files='ldb.pc',
                           cflags='-DLDB_MODULESDIR=\"%s\"' % modules_dir,
                           abi_file=abi_file,
                           abi_match='!ldb_*module_ops !ldb_*backend_ops ldb_*',
                           pc_files='ldb.pc',
                           cflags='-DLDB_MODULESDIR=\"%s\"' % modules_dir,
                           abi_file=abi_file,
                           abi_match='!ldb_*module_ops !ldb_*backend_ops ldb_*',
-                          vnum=VERSION)
+                          vnum=VERSION, manpages='man/ldb3.')
 
     bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE',
                         'tools/ldbutil.c tools/cmdline.c',
 
     bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE',
                         'tools/ldbutil.c tools/cmdline.c',
@@ -185,20 +186,6 @@ def build(bld):
                      deps='ldb',
                      realname='ldb.so')
 
                      deps='ldb',
                      realname='ldb.so')
 
-    if bld.env.XSLTPROC:
-        manpages = 'man/ldb.3'
-
-        bld.env.LDB_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} ${LDB_MAN_XSL} ${SRC}'
-                                )
-            bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
-
 
 def test(ctx):
     '''run ldb testsuite'''
 
 def test(ctx):
     '''run ldb testsuite'''