From d1dd9eafca62a7d15c4428bae8da16ad981cf24f Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Thu, 7 Jan 2021 00:46:26 +0100 Subject: [PATCH] build: (amend b9ebfb426eb51eb3f10cac21153c63f7425f961b) Fix inclusions for non-standard build directory. --- contrib/wscript | 5 ++--- src/wscript | 5 ++--- wscript | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/contrib/wscript b/contrib/wscript index f0903e36b..5545f1830 100644 --- a/contrib/wscript +++ b/contrib/wscript @@ -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 diff --git a/src/wscript b/src/wscript index e776dfd37..1ed9d675c 100644 --- a/src/wscript +++ b/src/wscript @@ -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 diff --git a/wscript b/wscript index 6797ebebb..4a8cccd88 100644 --- a/wscript +++ b/wscript @@ -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']: