1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

waf: get rid of target aliases in wafsamba

these aliases are no longer needed, and can cause a lot of confusion
This commit is contained in:
Andrew Tridgell 2010-10-30 14:33:06 +11:00
parent 679eba61ea
commit e08c9ac696
2 changed files with 1 additions and 30 deletions

View File

@ -19,16 +19,6 @@ def BREAK_CIRCULAR_LIBRARY_DEPENDENCIES(ctx):
ctx.env.ALLOW_CIRCULAR_LIB_DEPENDENCIES = True
def TARGET_ALIAS(bld, target, alias):
'''define an alias for a target name'''
cache = LOCAL_CACHE(bld, 'TARGET_ALIAS')
if alias in cache:
Logs.error("Target alias %s already set to %s : newalias %s" % (alias, cache[alias], target))
sys.exit(1)
cache[alias] = target
Build.BuildContext.TARGET_ALIAS = TARGET_ALIAS
@conf
def SET_SYSLIB_DEPS(conf, target, deps):
'''setup some implied dependencies for a SYSLIB'''
@ -36,15 +26,6 @@ def SET_SYSLIB_DEPS(conf, target, deps):
cache[target] = deps
def EXPAND_ALIAS(bld, target):
'''expand a target name via an alias'''
aliases = LOCAL_CACHE(bld, 'TARGET_ALIAS')
if target in aliases:
return aliases[target]
return target
Build.BuildContext.EXPAND_ALIAS = EXPAND_ALIAS
def expand_subsystem_deps(bld):
'''expand the reverse dependencies resulting from subsystem
attributes of modules. This is walking over the complete list
@ -52,12 +33,9 @@ def expand_subsystem_deps(bld):
module<->subsystem dependencies'''
subsystem_list = LOCAL_CACHE(bld, 'INIT_FUNCTIONS')
aliases = LOCAL_CACHE(bld, 'TARGET_ALIAS')
targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
for subsystem_name in subsystem_list:
if subsystem_name in aliases:
subsystem_name = aliases[subsystem_name]
bld.ASSERT(subsystem_name in targets, "Subsystem target %s not declared" % subsystem_name)
type = targets[subsystem_name]
if type == 'DISABLED' or type == 'EMPTY':
@ -443,7 +421,6 @@ def build_direct_deps(bld, tgt_list):
if getattr(t, 'samba_use_global_deps', False) and not t.sname in global_deps_exclude:
deps.extend(global_deps)
for d in deps:
d = EXPAND_ALIAS(bld, d)
if d == t.sname: continue
if not d in targets:
Logs.error("Unknown dependency '%s' in '%s'" % (d, t.sname))
@ -947,7 +924,7 @@ savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_incl
savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags', 'ldflags', 'samba_deps_extended']
savedeps_outenv = ['INC_PATHS']
savedeps_envvars = ['NONSHARED_BINARIES', 'GLOBAL_DEPENDENCIES']
savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_ALIAS', 'TARGET_TYPE', 'INIT_FUNCTIONS', 'SYSLIB_DEPS']
savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_TYPE', 'INIT_FUNCTIONS', 'SYSLIB_DEPS']
savedeps_files = ['buildtools/wafsamba/samba_deps.py']
def save_samba_deps(bld, tgt_list):

View File

@ -324,12 +324,6 @@ def SAMBA_BINARY(bld, binname, source,
samba_install = install
)
# setup the subsystem_name as an alias for the real
# binary name, so it can be found when expanding
# subsystem dependencies
if subsystem_name is not None:
bld.TARGET_ALIAS(subsystem_name, binname)
if manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']:
bld.MANPAGES(manpages)