(self, target, matches, binding)
| 46 | return "((#[ \t]*include|import(lib)?).+(<(.*)>|\"(.*)\").+)" |
| 47 | |
| 48 | def process(self, target, matches, binding): |
| 49 | included_angle = regex.transform(matches, self.re_include_angle) |
| 50 | included_quoted = regex.transform(matches, self.re_include_quoted) |
| 51 | imported = regex.transform(matches, self.re_import, [1, 3]) |
| 52 | imported_tlbs = regex.transform(matches, self.re_importlib, [1, 3]) |
| 53 | |
| 54 | # CONSIDER: the new scoping rule seem to defeat "on target" variables. |
| 55 | g = bjam.call('get-target-variable', target, 'HDRGRIST') |
| 56 | b = os.path.normalize_path(os.path.dirname(binding)) |
| 57 | |
| 58 | # Attach binding of including file to included targets. |
| 59 | # When target is directly created from virtual target |
| 60 | # this extra information is unnecessary. But in other |
| 61 | # cases, it allows to distinguish between two headers of the |
| 62 | # same name included from different places. |
| 63 | g2 = g + "#" + b |
| 64 | |
| 65 | g = "<" + g + ">" |
| 66 | g2 = "<" + g2 + ">" |
| 67 | |
| 68 | included_angle = [ g + x for x in included_angle ] |
| 69 | included_quoted = [ g + x for x in included_quoted ] |
| 70 | imported = [ g + x for x in imported ] |
| 71 | imported_tlbs = [ g + x for x in imported_tlbs ] |
| 72 | |
| 73 | all = included_angle + included_quoted + imported |
| 74 | |
| 75 | bjam.call('INCLUDES', [target], all) |
| 76 | bjam.call('DEPENDS', [target], imported_tlbs) |
| 77 | bjam.call('NOCARE', all + imported_tlbs) |
| 78 | engine.set_target_variable(included_angle , 'SEARCH', ungrist(self.includes)) |
| 79 | engine.set_target_variable(included_quoted, 'SEARCH', b + ungrist(self.includes)) |
| 80 | engine.set_target_variable(imported , 'SEARCH', b + ungrist(self.includes)) |
| 81 | engine.set_target_variable(imported_tlbs , 'SEARCH', b + ungrist(self.includes)) |
| 82 | |
| 83 | get_manager().scanners().propagate(type.get_scanner('CPP', PropertySet(self.includes)), included_angle + included_quoted) |
| 84 | get_manager().scanners().propagate(self, imported) |
| 85 | |
| 86 | scanner.register(MidlScanner, 'include') |
| 87 | type.set_scanner('IDL', MidlScanner) |
nothing calls this directly
no test coverage detected