diff --git a/bindings/python/wscript b/bindings/python/wscript index 7507b34d9..3f3161aea 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -68,7 +68,9 @@ def set_options(opt): action="store_true", default=False, dest='python_scan') opt.add_option('--apiscan', - help=("EXPERIMENTAL: Rescan module API, for Python bindings. Needs working GCCXML / pygccxml environment."), + help=("EXPERIMENTAL: Rescan the API for the indicated module(s), for Python bindings. " + "Needs working GCCXML / pygccxml environment. " + "The metamodule 'all' expands to all available ns-3 modules."), default=None, dest='apiscan', metavar="MODULE[,MODULE...]") opt.add_option('--with-pybindgen', help=('Path to an existing pybindgen source tree to use.'), @@ -653,8 +655,13 @@ def build(bld): scan_targets.append(('gcc_ILP32', '')) else: raise Utils.WafError("Cannot scan python bindings for unsupported data model") + if Options.options.apiscan == 'all': + scan_modules = [mod.split('ns3-')[1] for mod in env.NS3_ENABLED_MODULES] + else: + scan_modules = Options.options.apiscan.split(',') + print "Modules to scan: ", scan_modules for target, cflags in scan_targets: - for module in Options.options.apiscan.split(','): + for module in scan_modules: apiscan_task(bld.path, env, bld, target, cflags, module) python_scan_task_collector(bld.path, env, bld) return