From 12e1fdf0899c8f9176f4a7e789faa2758c4eaa70 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 21 Aug 2011 02:09:14 +0200 Subject: wafsamba: Require public libraries to have a pc file specified, or explicitly specified that they don't need one. --- buildtools/wafsamba/wafsamba.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'buildtools/wafsamba/wafsamba.py') diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 3858770a6f..85ff732f14 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -191,13 +191,19 @@ def SAMBA_LIBRARY(bld, libname, source, link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON')) # we don't want any public libraries without version numbers - if not private_library and vnum is None and soname is None and target_type != 'PYTHON' and not realname: - raise Utils.WafError("public library '%s' must have a vnum" % libname) + if (not private_library and target_type != 'PYTHON' and not realname): + if vnum is None and soname is None: + raise Utils.WafError("public library '%s' must have a vnum" % + libname) + if pc_files is None: + raise Utils.WafError("public library '%s' must have pkg-config file" % + libname) if target_type == 'PYTHON' or realname or not private_library: bundled_name = libname.replace('_', '-') else: - bundled_name = PRIVATE_NAME(bld, libname, bundled_extension, private_library) + bundled_name = PRIVATE_NAME(bld, libname, bundled_extension, + private_library) ldflags = TO_LIST(ldflags) @@ -273,7 +279,8 @@ def SAMBA_LIBRARY(bld, libname, source, if pc_files is not None: bld.PKG_CONFIG_FILES(pc_files, vnum=vnum) - if manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']: + if (manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and + bld.env['XSLTPROC_MANPAGES']): bld.MANPAGES(manpages) -- cgit