From 2a16dbfa9bf36b847b4982838895739fcc6ff6c7 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 22 Mar 2011 15:56:41 +0000 Subject: [PATCH] ./waf --apiscan=all: now only scans modules that have bld.ns3_python_bindings() in their wscript --- bindings/python/wscript | 5 ++++- src/wscript | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index f4b70cec7..84ae4fc88 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -671,7 +671,10 @@ def build(bld): continue if mod.name.endswith('-test'): continue - scan_modules.append(mod.name.split('ns3-')[1]) + bindings_enabled = (mod.name in env.MODULAR_BINDINGS_MODULES) + #print mod.name, bindings_enabled + if bindings_enabled: + scan_modules.append(mod.name.split('ns3-')[1]) else: scan_modules = Options.options.apiscan.split(',') print "Modules to scan: ", scan_modules diff --git a/src/wscript b/src/wscript index 1de9490fa..1106da09c 100644 --- a/src/wscript +++ b/src/wscript @@ -161,7 +161,12 @@ def create_obj(bld, *args): def ns3_python_bindings(bld): + # this method is called from a module wscript, so remember bld.path is not bindings/python! + module_abs_src_path = bld.path.abspath() + module = os.path.basename(module_abs_src_path) env = bld.env + env.append_value("MODULAR_BINDINGS_MODULES", "ns3-"+module) + if not env['ENABLE_PYTHON_BINDINGS']: return if env['BINDINGS_TYPE'] not in ('modular', 'both'): @@ -173,10 +178,6 @@ def ns3_python_bindings(bld): Warning, stacklevel=2) return - # this method is called from a module wscript, so remember bld.path is not bindings/python! - module_abs_src_path = bld.path.abspath() - module = os.path.basename(module_abs_src_path) - if ("ns3-%s" % (module,)) not in env.NS3_ENABLED_MODULES: #print "bindings for module %s which is not enabled, skip" % module return