From e839c44bd706492aee84153d7af502f9ba357bfd Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sun, 20 Mar 2011 17:56:06 +0000 Subject: [PATCH] Modular bindings: before scanning a module, check that xxx-module.h exists, skip the scanning if it doesn't --- bindings/python/wscript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index 3f3161aea..4a3046aa0 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -325,8 +325,13 @@ class apiscan_task(Task.TaskBase): def run(self): top_builddir = self.curdirnode.find_dir('../..').abspath(self.env) module_path = get_module_path(self.bld, self.module) - print module_path headers_map = get_headers_map(self.bld) + scan_header = os.path.join(top_builddir, "ns3", "%s-module.h" % self.module) + + if not os.path.exists(scan_header): + Logs.error("Cannot apiscan module %r: %s does not exist" % (self.module, scan_header)) + return 0 + argv = [ self.env['PYTHON'], os.path.join(self.curdirnode.abspath(), 'ns3modulescan-modular.py'), # scanning script