wafsamba: Require public libraries to have a pc file specified, or explicitly specifi...
authorJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 00:09:14 +0000 (02:09 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 01:22:05 +0000 (03:22 +0200)
buildtools/wafsamba/wafsamba.py
lib/util/wscript_build
librpc/wscript_build
source3/wscript_build

index 3858770..85ff732 100644 (file)
@@ -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)
 
 
index 82af65c..553748a 100755 (executable)
@@ -54,7 +54,8 @@ bld.SAMBA_LIBRARY('tevent-util',
        public_deps='tevent',
        public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
        header_path=[ ('*', 'util') ],
-                 vnum='0.0.1'
+       pc_files=[],
+       vnum='0.0.1'
        )
 
 
index 444cb94..cf6c448 100644 (file)
@@ -588,6 +588,7 @@ bld.SAMBA_LIBRARY('ndr',
        )
 
 bld.SAMBA_LIBRARY('dcerpc-binding',
-                  source='rpc/dcerpc_error.c rpc/binding.c rpc/dcerpc_util.c rpc/binding_handle.c',
-                  deps='ndr tevent NDR_DCERPC LIBTSOCKET tevent-util',
-                  vnum='0.0.1')
+         source='rpc/dcerpc_error.c rpc/binding.c rpc/dcerpc_util.c rpc/binding_handle.c',
+         deps='ndr tevent NDR_DCERPC LIBTSOCKET tevent-util',
+         pc_files=[],
+         vnum='0.0.1')
index 3cc8471..8d4a02f 100755 (executable)
@@ -670,6 +670,7 @@ bld.SAMBA3_LIBRARY('netapi',
                     RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_INITSHUTDOWN
                     INIT_NETLOGON INIT_SAMR popt_samba3''',
                     public_headers='../source3/lib/netapi/netapi.h',
+                    pc_files=[],
                     vnum='0',
                     vars=locals())
 
@@ -679,6 +680,7 @@ bld.SAMBA3_LIBRARY('libsmb/smbclient',
                     LIBMSRPC_GEN msrpc3 libcli_lsa3 RPC_NDR_SRVSVC popt_samba3''',
                     public_headers='include/libsmbclient.h',
                     vnum='0',
+                    pc_files=[],
                     vars=locals())
 
 bld.SAMBA3_LIBRARY('smbsharemodes',
@@ -686,6 +688,7 @@ bld.SAMBA3_LIBRARY('smbsharemodes',
                     public_deps='''talloc tdb_compat''',
                     deps='''ccan''',
                     public_headers='include/smb_share_modes.h',
+                    pc_files=[],
                     vnum='0',
                     vars=locals())
 
@@ -886,6 +889,7 @@ bld.SAMBA3_LIBRARY('smbconf',
                    deps='''LIBSMBCONF smbregistry REG_SMBCONF talloc param
                    util_reg samba-util errors3 charset SAMBA_VERSION''',
                    public_headers='../lib/smbconf/smbconf.h',
+                   pc_files=[],
                    vnum='0')
 
 bld.SAMBA3_LIBRARY('smbd_conn',