build: (fixes #15) Fix build erroneous order constraint warnings
Patch based on original suggestion from ita1024 on updated constraints
This commit is contained in:
@@ -354,8 +354,8 @@ def get_module_path(bld, module):
|
|||||||
class apiscan_task(Task.Task):
|
class apiscan_task(Task.Task):
|
||||||
"""Uses castxml to scan the file 'everything.h' and extract API definitions.
|
"""Uses castxml to scan the file 'everything.h' and extract API definitions.
|
||||||
"""
|
"""
|
||||||
after = 'gen_ns3_module_header ns3header'
|
before = ['cxxprogram', 'cxxshlib', 'cxxstlib', 'command']
|
||||||
before = 'cxx command'
|
after = ['gen_ns3_module_header', 'ns3header']
|
||||||
color = "BLUE"
|
color = "BLUE"
|
||||||
def __init__(self, curdirnode, env, bld, target, cflags, module):
|
def __init__(self, curdirnode, env, bld, target, cflags, module):
|
||||||
self.bld = bld
|
self.bld = bld
|
||||||
@@ -460,7 +460,7 @@ def get_modules_and_headers(bld):
|
|||||||
|
|
||||||
class gen_ns3_compat_pymod_task(Task.Task):
|
class gen_ns3_compat_pymod_task(Task.Task):
|
||||||
"""Generates a 'ns3.py' compatibility module."""
|
"""Generates a 'ns3.py' compatibility module."""
|
||||||
before = 'cxx'
|
before = ['cxxprogram', 'cxxshlib', 'cxxstlib']
|
||||||
color = 'BLUE'
|
color = 'BLUE'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ def ns3_python_bindings(bld):
|
|||||||
bindgen = bld(features='command', source=source, target=target, command=argv)
|
bindgen = bld(features='command', source=source, target=target, command=argv)
|
||||||
bindgen.env['FEATURES'] = ','.join(features)
|
bindgen.env['FEATURES'] = ','.join(features)
|
||||||
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
|
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
|
||||||
bindgen.before = 'cxx'
|
bindgen.before = ['cxxprogram', 'cxxshlib', 'cxxstlib']
|
||||||
bindgen.after = 'gen_ns3_module_header'
|
bindgen.after = 'gen_ns3_module_header'
|
||||||
bindgen.name = "pybindgen(ns3 module %s)" % module
|
bindgen.name = "pybindgen(ns3 module %s)" % module
|
||||||
bindgen.install_path = None
|
bindgen.install_path = None
|
||||||
|
|||||||
10
src/wscript
10
src/wscript
@@ -252,8 +252,6 @@ def ns3_python_bindings(bld):
|
|||||||
bindgen = bld(features='command', source=source, target=target, command=argv)
|
bindgen = bld(features='command', source=source, target=target, command=argv)
|
||||||
bindgen.env['FEATURES'] = ','.join(features)
|
bindgen.env['FEATURES'] = ','.join(features)
|
||||||
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
|
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
|
||||||
bindgen.before = 'cxx'
|
|
||||||
bindgen.after = 'gen_ns3_module_header'
|
|
||||||
bindgen.name = "pybindgen(ns3 module %s)" % module
|
bindgen.name = "pybindgen(ns3 module %s)" % module
|
||||||
bindgen.install_path = None
|
bindgen.install_path = None
|
||||||
|
|
||||||
@@ -321,7 +319,7 @@ def build(bld):
|
|||||||
modheader.module = module.split('/')[-1]
|
modheader.module = module.split('/')[-1]
|
||||||
|
|
||||||
class ns3pcfile(Task.Task):
|
class ns3pcfile(Task.Task):
|
||||||
after = 'cxx'
|
after = ['cxxprogram', 'cxxshlib', 'cxxstlib']
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
"string to display to the user"
|
"string to display to the user"
|
||||||
@@ -461,7 +459,7 @@ def apply_ns3header(self):
|
|||||||
|
|
||||||
|
|
||||||
class ns3header(Task.Task):
|
class ns3header(Task.Task):
|
||||||
before = 'cxx gen_ns3_module_header'
|
before = ['cxxprogram', 'cxxshlib', 'cxxstlib', 'gen_ns3_module_header']
|
||||||
color = 'BLUE'
|
color = 'BLUE'
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@@ -552,7 +550,7 @@ def apply_ns3privateheader(self):
|
|||||||
self.source = '' # tell WAF not to process these files further
|
self.source = '' # tell WAF not to process these files further
|
||||||
|
|
||||||
class ns3privateheader(Task.Task):
|
class ns3privateheader(Task.Task):
|
||||||
before = 'cxx gen_ns3_module_header'
|
before = ['cxxprogram', 'cxxshlib', 'cxxstlib', 'gen_ns3_module_header']
|
||||||
after = 'ns3header'
|
after = 'ns3header'
|
||||||
color = 'BLUE'
|
color = 'BLUE'
|
||||||
|
|
||||||
@@ -622,7 +620,7 @@ class ns3privateheader(Task.Task):
|
|||||||
|
|
||||||
|
|
||||||
class gen_ns3_module_header(Task.Task):
|
class gen_ns3_module_header(Task.Task):
|
||||||
before = 'cxx'
|
before = ['cxxprogram', 'cxxshlib', 'cxxstlib']
|
||||||
after = 'ns3header'
|
after = 'ns3header'
|
||||||
color = 'BLUE'
|
color = 'BLUE'
|
||||||
|
|
||||||
|
|||||||
61
wscript
61
wscript
@@ -689,7 +689,7 @@ def configure(conf):
|
|||||||
class SuidBuild_task(Task.Task):
|
class SuidBuild_task(Task.Task):
|
||||||
"""task that makes a binary Suid
|
"""task that makes a binary Suid
|
||||||
"""
|
"""
|
||||||
after = 'link'
|
after = ['cxxprogram', 'cxxshlib', 'cxxstlib']
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(SuidBuild_task, self).__init__(*args, **kwargs)
|
super(SuidBuild_task, self).__init__(*args, **kwargs)
|
||||||
self.m_display = 'build-suid'
|
self.m_display = 'build-suid'
|
||||||
@@ -1174,65 +1174,6 @@ class CheckContext(Context.Context):
|
|||||||
wutils.bld = bld
|
wutils.bld = bld
|
||||||
wutils.run_python_program("test.py -n -c core", bld.env)
|
wutils.run_python_program("test.py -n -c core", bld.env)
|
||||||
|
|
||||||
|
|
||||||
class print_introspected_doxygen_task(Task.TaskBase):
|
|
||||||
after = 'cxx link'
|
|
||||||
color = 'BLUE'
|
|
||||||
|
|
||||||
def __init__(self, bld):
|
|
||||||
self.bld = bld
|
|
||||||
super(print_introspected_doxygen_task, self).__init__(generator=self)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return 'print-introspected-doxygen\n'
|
|
||||||
|
|
||||||
def runnable_status(self):
|
|
||||||
return Task.RUN_ME
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
## generate the trace sources list docs
|
|
||||||
env = wutils.bld.env
|
|
||||||
proc_env = wutils.get_proc_env()
|
|
||||||
try:
|
|
||||||
program_obj = wutils.find_program('print-introspected-doxygen', env)
|
|
||||||
except ValueError: # could happen if print-introspected-doxygen is
|
|
||||||
# not built because of waf configure
|
|
||||||
# --enable-modules=xxx
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
prog = program_obj.path.find_or_declare(ccroot.get_target_name(program_obj)).get_bld().abspath(env)
|
|
||||||
|
|
||||||
# Create a header file with the introspected information.
|
|
||||||
doxygen_out = open(os.path.join('doc', 'introspected-doxygen.h'), 'w')
|
|
||||||
if subprocess.Popen([prog], stdout=doxygen_out, env=proc_env).wait():
|
|
||||||
raise SystemExit(1)
|
|
||||||
doxygen_out.close()
|
|
||||||
|
|
||||||
# Create a text file with the introspected information.
|
|
||||||
text_out = open(os.path.join('doc', 'ns3-object.txt'), 'w')
|
|
||||||
if subprocess.Popen([prog, '--output-text'], stdout=text_out, env=proc_env).wait():
|
|
||||||
raise SystemExit(1)
|
|
||||||
text_out.close()
|
|
||||||
|
|
||||||
class run_python_unit_tests_task(Task.TaskBase):
|
|
||||||
after = 'cxx link'
|
|
||||||
color = 'BLUE'
|
|
||||||
|
|
||||||
def __init__(self, bld):
|
|
||||||
self.bld = bld
|
|
||||||
super(run_python_unit_tests_task, self).__init__(generator=self)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return 'run-python-unit-tests\n'
|
|
||||||
|
|
||||||
def runnable_status(self):
|
|
||||||
return Task.RUN_ME
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
proc_env = wutils.get_proc_env()
|
|
||||||
wutils.run_argv([self.bld.env['PYTHON'], os.path.join("..", "utils", "python-unit-tests.py")],
|
|
||||||
self.bld.env, proc_env, force_no_valgrind=True)
|
|
||||||
|
|
||||||
def check_shell(bld):
|
def check_shell(bld):
|
||||||
if ('NS3_MODULE_PATH' not in os.environ) or ('NS3_EXECUTABLE_PATH' not in os.environ):
|
if ('NS3_MODULE_PATH' not in os.environ) or ('NS3_EXECUTABLE_PATH' not in os.environ):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user