bindings/python/wscript
changeset 6923 57c9dfe52e67
parent 6922 e264ea29df5e
child 6926 1b32cc1532a9
--- a/bindings/python/wscript	Sun Mar 20 15:17:09 2011 +0000
+++ b/bindings/python/wscript	Sun Mar 20 15:41:43 2011 +0000
@@ -68,7 +68,9 @@
                    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 @@
                 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