The 'everything.h' header file is only used for Python bindings and should be generated into bindings/python/, not ns3/.

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-07-09 14:58:02 +01:00
1 parent 5f994081d5
commit 0f045371a3
3 files changed
+11 -10

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ class MyMultiSectionFactory(MultiSectionFactory):
def main():
out = MyMultiSectionFactory(sys.argv[1], sys.argv[2:])
root_module = module_init()
root_module.add_include('"ns3/everything.h"')
root_module.add_include('"everything.h"')
register_types(root_module)
+5 -5
View File
@@ -228,7 +228,7 @@ class MyPygenClassifier(PygenClassifier):
return '__main__'
def ns3_module_scan(top_builddir, pygen_file_name):
def ns3_module_scan(top_builddir, pygen_file_name, everything_h):
ns3_modules = eval(sys.stdin.read())
@@ -239,7 +239,7 @@ def ns3_module_scan(top_builddir, pygen_file_name):
for dep in ns3_module_deps:
graph.append((dep, ns3_module_name))
sorted_ns3_modules = topsort(graph)
print >> sys.stderr, "******* topological sort: ", sorted_ns3_modules
#print >> sys.stderr, "******* topological sort: ", sorted_ns3_modules
sections = [PygenSection('__main__', FileCodeSink(open(pygen_file_name, "wt")))]
headers_map = {} # header_name -> section_name
@@ -255,8 +255,8 @@ def ns3_module_scan(top_builddir, pygen_file_name):
module_parser.add_pre_scan_hook(pre_scan_hook)
#module_parser.add_post_scan_hook(post_scan_hook)
module_parser.parse_init([os.path.join(top_builddir, 'ns3', 'everything.h')],
include_paths=[top_builddir], whitelist_paths=[top_builddir],
module_parser.parse_init([everything_h],
include_paths=[top_builddir], whitelist_paths=[top_builddir, os.path.dirname(everything_h)],
#includes=['"ns3/everything.h"'],
pygen_sink=sections,
pygen_classifier=MyPygenClassifier(headers_map))
@@ -277,5 +277,5 @@ def ns3_module_scan(top_builddir, pygen_file_name):
if __name__ == '__main__':
ns3_module_scan(sys.argv[1], sys.argv[2])
ns3_module_scan(sys.argv[1], sys.argv[3], sys.argv[2])
+5 -4
View File
@@ -219,8 +219,8 @@ class all_ns3_headers_taskgen(Object.task_gen):
"""
def __init__(self, *features):
Object.task_gen.__init__(self, *features)
self.inst_var = 'INCLUDEDIR'
self.inst_dir = 'ns3'
self.inst_var = 0#'INCLUDEDIR'
#self.inst_dir = 'ns3'
def apply(self):
## get all of the ns3 headers
@@ -249,7 +249,7 @@ class all_ns3_headers_taskgen(Object.task_gen):
fatal("missing header file %s" % (source,))
all_headers_inputs.append(node)
assert all_headers_inputs
all_headers_outputs = [ns3_dir_node.find_build("everything.h")]
all_headers_outputs = [self.path.find_build("everything.h")]
task = self.create_task('gen-ns3-metaheader', self.env, 4)
task.set_inputs(all_headers_inputs)
task.set_outputs(all_headers_outputs)
@@ -302,6 +302,7 @@ def build(bld):
env['PYTHON'],
os.path.join(curdir, 'ns3modulescan.py'), # scanning script
bld.m_curdirnode.find_dir('../..').abspath(env), # include path (where the ns3 include dir is)
bld.m_curdirnode.find_build('everything.h').abspath(env),
os.path.join(curdir, 'ns3modulegen_generated.py'), # output file
]
scan = subprocess.Popen(argv, stdin=subprocess.PIPE)
@@ -323,7 +324,7 @@ def build(bld):
bindgen.output_file("ns3module.cc"),
]
bindgen.argv.extend(get_modules_and_headers().iterkeys())
bindgen.hidden_inputs = ['../../ns3/everything.h',
bindgen.hidden_inputs = ['everything.h',
'ns3modulegen_generated.py',
'ns3modulegen_core_customizations.py']
for module in get_modules_and_headers().iterkeys():