diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-28 17:34:43 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:39 +1000 |
commit | bc39054bc3da62ef6220f2bdae36ea9f9096da47 (patch) | |
tree | fbdf66b7a34cae4d9ec8441621b6e6d9cac947bd /buildtools/wafsamba/wafsamba.py | |
parent | bd54d2a87dcabe1ff520662780673a7aaf52cc3f (diff) | |
download | samba-bc39054bc3da62ef6220f2bdae36ea9f9096da47.tar.gz samba-bc39054bc3da62ef6220f2bdae36ea9f9096da47.tar.bz2 samba-bc39054bc3da62ef6220f2bdae36ea9f9096da47.zip |
build: rewrote PIDL rules, breaking them into a separate waf tool
Diffstat (limited to 'buildtools/wafsamba/wafsamba.py')
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index a33d5d4ada..76bc3ba011 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -10,35 +10,11 @@ from TaskGen import extension from samba_utils import * from samba_autoconf import * from samba_patterns import * +from samba_pidl import * LIB_PATH="shared" -############################################################# -# set a value in a local cache -# return False if it's already set -def SET_TARGET_TYPE(ctx, target, value): - cache = LOCAL_CACHE(ctx, 'TARGET_TYPE') - if target in cache: - 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 - assumed = LOCAL_CACHE(ctx, 'ASSUMED_TARGET') - if target in assumed: - #if assumed[target] != value: - # print "Target '%s' was assumed of type '%s' but is '%s'" % (target, assumed[target], value) - ASSERT(ctx, assumed[target] == value, - "Target '%s' was assumed of type '%s' but is '%s'" % (target, assumed[target], value)) - predeclared = LOCAL_CACHE(ctx, 'PREDECLARED_TARGET') - if target in predeclared: - ASSERT(ctx, predeclared[target] == value, - "Target '%s' was predeclared of type '%s' but is '%s'" % (target, predeclared[target], value)) - 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 - - ################################################################# # create the samba build environment @conf @@ -131,7 +107,7 @@ def ADD_DEPENDENCIES(bld, name, deps): CHECK_TARGET_DEPENDENCY(bld, name) list2.append(d) except AssertionError: - debug("deps: Removing dependency %s from target %s" % (d, name)) + sys.stderr.write("Removing dependency %s from target %s" % (d, name)) del(lib_deps[name][d]) # extract out the system dependencies @@ -357,23 +333,6 @@ def SAMBA_ERRTABLE(bld, name, source, ) Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE -################################################################# -# define a PIDL target -def SAMBA_PIDL(bld, directory, source, options=''): - name = os.path.basename(string.replace(source, '.idl', '')) - name = "%s/ndr_%s.o" % (directory, name) - - if not SET_TARGET_TYPE(bld, name, 'PIDL'): - return - - bld.SET_BUILD_GROUP('build_source') - bld( - features = 'cc', - source = source, - target = name, - options = options - ) -Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL |