Error when private libraries have public headers.
authorJelmer Vernooij <jelmer@jelmer.uk>
Mon, 28 Dec 2015 00:04:02 +0000 (00:04 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 13 Jan 2016 03:43:22 +0000 (04:43 +0100)
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
buildtools/wafsamba/wafsamba.py

index 3b05916b45b4cc5bb73c76ca955531767c58f26b..4a47dbffe02cf78396ec50790a34b9829d66a834 100644 (file)
@@ -146,8 +146,12 @@ def SAMBA_LIBRARY(bld, libname, source,
     if pyembed and bld.env['IS_EXTRA_PYTHON']:
         public_headers = pc_files = None
 
+    if private_library and public_headers:
+        raise Utils.WafError("private library '%s' must not have public header files" %
+                             libname)
+
     if LIB_MUST_BE_PRIVATE(bld, libname):
-        private_library=True
+        private_library = True
 
     if not enabled:
         SET_TARGET_TYPE(bld, libname, 'DISABLED')