build: (amend b9ebfb426e) Fix inclusions

for non-standard build directory.
This commit is contained in:
Tommaso Pecorella
2021-01-07 00:46:26 +01:00
committed by Tommaso Pecorella
parent f613dcfc5c
commit d1dd9eafca
3 changed files with 5 additions and 7 deletions

View File

@@ -140,8 +140,7 @@ def create_ns3_module(bld, name, dependencies=(), test=False):
module.is_ns3_module = True
module.ns3_dir_location = bld.path.path_from(bld.srcnode)
builddirname = Context.top_dir + '/build'
module.env.append_value("INCLUDES", builddirname)
module.env.append_value("INCLUDES", Context.out_dir)
module.pcfilegen = bld(features='ns3pcfile')
module.pcfilegen.module = module.name
@@ -291,7 +290,7 @@ def ns3_python_bindings(bld):
pymod.env['DEFINES'] = defines
# The following string should lead to includes of
# '-I.', '-Isrc/core/bindings' when compiling module_helpers.cc
pymod.includes = Context.top_dir + '/build' + ' ' + Context.top_dir + '/build/src/core/bindings'
pymod.includes = Context.out_dir + ' ' + Context.out_dir + '/src/core/bindings'
pymod.install_path = '${PYTHONARCHDIR}/ns'
# Workaround to a WAF bug, remove this when ns-3 upgrades to WAF > 1.6.10

View File

@@ -125,8 +125,7 @@ def create_ns3_module(bld, name, dependencies=(), test=False):
module.is_ns3_module = True
module.ns3_dir_location = bld.path.path_from(bld.srcnode)
builddirname = Context.top_dir + '/build'
module.env.append_value("INCLUDES", builddirname)
module.env.append_value("INCLUDES", Context.out_dir)
module.pcfilegen = bld(features='ns3pcfile')
module.pcfilegen.module = module.name
@@ -290,7 +289,7 @@ def ns3_python_bindings(bld):
pymod.env['DEFINES'] = defines
# The following string should lead to includes of
# '-I.', '-Isrc/core/bindings' when compiling module_helpers.cc
pymod.includes = Context.top_dir + '/build' + ' ' + Context.top_dir + '/build/src/core/bindings'
pymod.includes = Context.out_dir + ' ' + Context.out_dir + '/src/core/bindings'
pymod.install_path = '${PYTHONARCHDIR}/ns'
# Workaround to a WAF bug, remove this when ns-3 upgrades to WAF > 1.6.10

View File

@@ -763,7 +763,7 @@ def create_ns3_program(bld, name, dependencies=('core',)):
program.target = "%s%s-%s%s" % (wutils.APPNAME, wutils.VERSION, name, bld.env.BUILD_SUFFIX)
# Each of the modules this program depends on has its own library.
program.ns3_module_dependencies = ['ns3-'+dep for dep in dependencies]
program.includes = Context.top_dir + '/build'
program.includes = Context.out_dir
#make a copy here to prevent additions to program.use from polluting program.ns3_module_dependencies
program.use = program.ns3_module_dependencies.copy()
if program.env['ENABLE_STATIC_NS3']: