heimdal_build: Simplify library handling.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 17 Dec 2010 17:42:34 +0000 (18:42 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 17 Dec 2010 17:42:34 +0000 (18:42 +0100)
buildtools/wafsamba/wafsamba.py
source4/heimdal_build/wscript_build

index 19ebe23b601d23c91db3e047818f80564b5ebf9d..40dae9bd0aab8a094d369dbf4b96e9a930d4dd73 100644 (file)
@@ -226,7 +226,7 @@ def SAMBA_LIBRARY(bld, libname, source,
         source          = [],
         target          = bundled_name,
         depends_on      = depends_on,
-        samba_ldflags  = ldflags,
+        samba_ldflags   = ldflags,
         samba_deps      = deps,
         samba_includes  = includes,
         local_include   = local_include,
index 16af81acc38da2864f2f6a6a79140d9d17b63090..77165e61a8f4ffd41bbff5fd0e2e8d14d971c937 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import os, Utils, Build
+import os, Utils
 from samba_utils import SET_TARGET_TYPE
 from samba_autoconf import CURRENT_CFLAGS
 
@@ -202,10 +202,7 @@ def HEIMDAL_GENERATOR(name, rule, source='', target='',
         name=name)
 
 
-def HEIMDAL_LIBRARY(libname, source, deps, vnum,
-                  includes='',
-                  cflags='',
-                  private_library=True):
+def HEIMDAL_LIBRARY(libname, source, deps, vnum, includes='', cflags=''):
     '''define a Heimdal library'''
 
     obj_target = libname + '.objlist'
@@ -229,16 +226,14 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum,
 
     ldflags = []
 
-    if not private_library:
-        # Sanitize the library name
-        bundled_name = libname.lower().replace('_', '-')
-        while bundled_name.startswith("lib"):
-            bundled_name = bundled_name[3:]
-        version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION.split(".")[0])
-    else:
+    # FIXME: When building upstream heimdal, we should not be adding this
+    # suffix.
+    bundled_build = True
+    if bundled_build:
         bundled_name = libname + '-samba4'
-        vnum = Utils.g_module.VERSION[0]
-        version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION)
+    else:
+        bundled_name = libname
+    version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION)
 
     if bld.env.HAVE_LD_VERSION_SCRIPT:
         vscript = "%s.vscript" % libname
@@ -262,9 +257,9 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum,
         vnum            = vnum,
         install_path    = None,
         name            = libname,
-        ldflags                = ldflags,
-        vars           = [version],
-        private_library = private_library
+        ldflags         = ldflags,
+        vars            = [version],
+        private_library = bundled_build,
         )