From 50256c01d061c6d73bb2d8ee2c60785d58748e6c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 24 Oct 2010 11:50:47 -0700 Subject: waf: Only specify vnum for non-private libraries. --- lib/talloc/wscript | 35 ++++++++++++++++++++--------------- lib/tdb/wscript | 18 ++++++++++++------ lib/tevent/wscript | 19 ++++++++++++------- source4/lib/ldb/wscript | 8 ++++++-- 4 files changed, 50 insertions(+), 30 deletions(-) diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 56de6eabc7..3cf5ade2c8 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -52,6 +52,24 @@ def configure(conf): def build(bld): bld.RECURSE('lib/replace') + if bld.env.standalone_talloc: + bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + bld.env.TALLOC_VERSION = VERSION + bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION) + bld.INSTALL_FILES('${INCLUDEDIR}', 'talloc.h') + private_library = False + vnum = VERSION + + # should we also install the symlink to libtalloc1.so here? + bld.SAMBA_LIBRARY('talloc-compat1', + 'compat/talloc_compat1.c', + deps='talloc', + enabled = bld.env.TALLOC_COMPAT1, + vnum=VERSION) + else: + private_library = True + vnum = None + if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'): bld.SAMBA_LIBRARY('talloc', @@ -60,18 +78,10 @@ def build(bld): abi_file='ABI/talloc-%s.sigs' % VERSION, abi_match='talloc* _talloc*', hide_symbols=True, - vnum=VERSION, - private_library=not bld.env.standalone_talloc, + vnum=vnum, + private_library=private_library, manpages='talloc.3') - # should we also install the symlink to libtalloc1.so here? - bld.SAMBA_LIBRARY('talloc-compat1', - 'compat/talloc_compat1.c', - deps='talloc', - enabled = bld.env.TALLOC_COMPAT1, - vnum=VERSION, - private_library=not bld.env.standalone_talloc) - if not getattr(bld.env, '_SAMBA_BUILD_', 0) == 4: # s4 already has the talloc testsuite builtin to smbtorture bld.SAMBA_BINARY('talloc_testsuite', @@ -79,11 +89,6 @@ def build(bld): deps='talloc', install=False) - if bld.env.standalone_talloc: - bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' - bld.env.TALLOC_VERSION = VERSION - bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION) - bld.INSTALL_FILES('${INCLUDEDIR}', 'talloc.h') def test(ctx): '''run talloc testsuite''' diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 37af34c2f5..fcb15f8218 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -62,6 +62,16 @@ def build(bld): freelistcheck.c lock.c dump.c freelist.c io.c open.c transaction.c hash.c''') + if bld.env.standalone_tdb: + bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + bld.PKG_CONFIG_FILES('tdb.pc', vnum=VERSION) + bld.INSTALL_FILES('${INCLUDEDIR}', 'include/tdb.h', flat=True) + vnum = VERSION + private_library = False + else: + private_library = True + vnum = None + if not bld.CONFIG_SET('USING_SYSTEM_TDB'): bld.SAMBA_LIBRARY('tdb', COMMON_SRC, @@ -70,8 +80,8 @@ def build(bld): abi_file='ABI/tdb-%s.sigs' % VERSION, abi_match='tdb_*', hide_symbols=True, - vnum=VERSION, - private_library=not bld.env.standalone_tdb) + vnum=vnum, + private_library=private_library) bld.SAMBA_BINARY('tdbtorture', 'tools/tdbtorture.c', @@ -103,10 +113,6 @@ def build(bld): realname='tdb.so', cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) - if bld.env.standalone_tdb: - bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' - bld.PKG_CONFIG_FILES('tdb.pc', vnum=VERSION) - bld.INSTALL_FILES('${INCLUDEDIR}', 'include/tdb.h', flat=True) def test(ctx): diff --git a/lib/tevent/wscript b/lib/tevent/wscript index a502860100..590fbfeec0 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -66,6 +66,16 @@ def build(bld): if bld.CONFIG_SET('HAVE_EPOLL'): SRC += ' tevent_epoll.c' + if bld.env.standalone_tevent: + bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION) + bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h') + private_library = False + vnum = VERSION + else: + private_library = True + vnum = None + if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'): bld.SAMBA_LIBRARY('tevent', SRC, @@ -73,13 +83,8 @@ def build(bld): enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'), abi_file='ABI/tevent-%s.sigs' % VERSION, abi_match='tevent_* _tevent_*', - vnum=VERSION, - private_library=not bld.env.standalone_tevent) - - if bld.env.standalone_tevent: - bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' - bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION) - bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h') + vnum=vnum, + private_library=private_library) bld.SAMBA_PYTHON('pytevent', 'pytevent.c', diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index cdf13c3fd2..6b5f0c3e1b 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -130,9 +130,13 @@ def build(bld): # do ABI checking on the standalone ldb abi_file = 'ABI/ldb-%s.sigs' % VERSION abi_match = '!ldb_*module_ops !ldb_*backend_ops ldb_*' + private_library = False + vnum = VERSION else: abi_file = None abi_match = None + private_library = True + vnum = None bld.SAMBA_LIBRARY('ldb', COMMON_SRC + ' ' + LDB_MAP_SRC, @@ -141,10 +145,10 @@ def build(bld): public_headers='include/ldb.h include/ldb_errors.h '\ 'include/ldb_module.h include/ldb_handlers.h', pc_files='ldb.pc', - vnum=VERSION, manpages='man/ldb.3', + vnum=vnum, manpages='man/ldb.3', abi_file = abi_file, abi_match = abi_match, - private_library=not bld.env.standalone_ldb) + private_library=private_library) bld.SAMBA_PYTHON('pyldb', 'pyldb.c', deps='ldb pyldb-util', -- cgit