summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_utils.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-15 14:43:43 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-15 14:43:50 +1000
commit0bda3bae4cd68285e106261ffe79a1da1f778861 (patch)
treeed9498f246e21f9d8ac62e2f8efe58fa44572265 /buildtools/wafsamba/samba_utils.py
parentdaf4ad59057d9a7970393d94a4f1c3dfd1e77d21 (diff)
downloadsamba-0bda3bae4cd68285e106261ffe79a1da1f778861.tar.gz
samba-0bda3bae4cd68285e106261ffe79a1da1f778861.tar.bz2
samba-0bda3bae4cd68285e106261ffe79a1da1f778861.zip
build: throw a fatal error for duplicate target declarations
We don't want someone to declare two subsystems of the same name but with different source files Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/wafsamba/samba_utils.py')
-rw-r--r--buildtools/wafsamba/samba_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index bf051afa3b..94975c6519 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -16,10 +16,10 @@ def SET_TARGET_TYPE(ctx, target, value):
'''set the target type of a target'''
cache = LOCAL_CACHE(ctx, 'TARGET_TYPE')
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))
- return False
+ Logs.error("ERROR: Target '%s' in directory %s re-defined as %s - was %s" % (target,
+ ctx.curdir,
+ value, cache[target]))
+ sys.exit(1)
LOCAL_CACHE_SET(ctx, 'TARGET_TYPE', target, value)
debug("task_gen: Target '%s' created of type '%s' in %s" % (target, value, ctx.curdir))
return True