build: allow target upgrades from EMPTY to SYSLIB
authorAndrew Tridgell <tridge@samba.org>
Mon, 12 Apr 2010 06:21:21 +0000 (00:21 -0600)
committerAndrew Tridgell <tridge@samba.org>
Mon, 12 Apr 2010 07:47:29 +0000 (17:47 +1000)
A library may be initially set as empty if it wasn't needed for a list
of functions in CHECK_FUNCS_IN(). A later check may require the
library.

Pair-Programmed-With: Kai Blin <kai@samba.org>

buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/samba_utils.py

index fcd900dec13c28d632e57434b3bd0a4b62ed2a60..60c505717bac451a9e8e4419b7029395120b30a4 100644 (file)
@@ -449,7 +449,7 @@ def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True):
     liblist  = TO_LIST(libs)
     ret = True
     for lib in liblist[:]:
     liblist  = TO_LIST(libs)
     ret = True
     for lib in liblist[:]:
-        if GET_TARGET_TYPE(conf, lib):
+        if GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
             continue
 
         (ccflags, ldflags) = library_flags(conf, lib)
             continue
 
         (ccflags, ldflags) = library_flags(conf, lib)
index 8016da44bc2205d066973e4eaf2edc680d527839..7ee166351320e6d6dc7356c87e18420d10263410 100644 (file)
@@ -15,7 +15,7 @@ LIB_PATH="shared"
 def SET_TARGET_TYPE(ctx, target, value):
     '''set the target type of a target'''
     cache = LOCAL_CACHE(ctx, 'TARGET_TYPE')
 def SET_TARGET_TYPE(ctx, target, value):
     '''set the target type of a target'''
     cache = LOCAL_CACHE(ctx, 'TARGET_TYPE')
-    if target in cache:
+    if target in cache and cache[target] != 'EMPTY':
         ASSERT(ctx, cache[target] == value,
                "Target '%s' re-defined as %s - was %s" % (target, value, cache[target]))
         debug("task_gen: Skipping duplicate target %s (curdir=%s)" % (target, ctx.curdir))
         ASSERT(ctx, cache[target] == value,
                "Target '%s' re-defined as %s - was %s" % (target, value, cache[target]))
         debug("task_gen: Skipping duplicate target %s (curdir=%s)" % (target, ctx.curdir))