WAF: derive the variable NS3_MODULES from the 'all_modules' list in src/wscript, instead of requiring every module to define a configure function to register themselves. This way module registration is done in one place only: src/wscript. Requires module naming conventions, though.

This commit is contained in:
Gustavo J. A. M. Carneiro
2007-07-15 13:04:47 +01:00
parent b6c0155487
commit ae8f10ae47
8 changed files with 3 additions and 25 deletions

View File

@@ -29,9 +29,11 @@ def configure(conf):
blddir = os.path.abspath(os.path.join(conf.m_blddir, conf.env.variant()))
for module in all_modules:
conf.sub_config(module)
conf.env.append_value('NS3_MODULE_PATH', os.path.join(blddir, 'src', module))
## Used to link the 'run-tests' program with all of ns-3 code
conf.env['NS3_MODULES'] = ['ns3-' + module.split('/')[-1] for module in all_modules]
def build(bld):
Object.register('ns3header', Ns3Header)