| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright 2014 Google Inc. | 3 # Copyright 2014 Google Inc. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 """Functions for parsing the gypd output from gyp. | 8 """Functions for parsing the gypd output from gyp. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 assert('configurations' in d) | 82 assert('configurations' in d) |
| 83 config = d['configurations'][config_name] | 83 config = d['configurations'][config_name] |
| 84 parse_dictionary(var_dict, config, current_target_name, dest_dir) | 84 parse_dictionary(var_dict, config, current_target_name, dest_dir) |
| 85 | 85 |
| 86 for flag in d.get('cflags', []): | 86 for flag in d.get('cflags', []): |
| 87 var_dict.LOCAL_CFLAGS.add(flag) | 87 var_dict.LOCAL_CFLAGS.add(flag) |
| 88 for flag in d.get('cflags_cc', []): | 88 for flag in d.get('cflags_cc', []): |
| 89 var_dict.LOCAL_CPPFLAGS.add(flag) | 89 var_dict.LOCAL_CPPFLAGS.add(flag) |
| 90 | 90 |
| 91 for include in d.get('include_dirs', []): | 91 for include in d.get('include_dirs', []): |
| 92 if include.startswith('external'): | 92 if include.startswith('external') or include.startswith('frameworks'): |
| 93 # This path is relative to the Android root. Leave it alone. | 93 # This path is relative to the Android root. Leave it alone. |
| 94 rel_include = include | 94 rel_include = include |
| 95 else: | 95 else: |
| 96 # As with source, the input path will be relative to gyp/, but Android | 96 # As with source, the input path will be relative to gyp/, but Android |
| 97 # wants relative to dest_dir. | 97 # wants relative to dest_dir. |
| 98 rel_include = os.path.relpath(include, os.pardir) | 98 rel_include = os.path.relpath(include, os.pardir) |
| 99 rel_include = os.path.relpath(rel_include, dest_dir) | 99 rel_include = os.path.relpath(rel_include, dest_dir) |
| 100 # No need to include the base directory. | 100 # No need to include the base directory. |
| 101 if rel_include is os.curdir: | 101 if rel_include is os.curdir: |
| 102 continue | 102 continue |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 # Avoid circular dependencies | 144 # Avoid circular dependencies |
| 145 continue | 145 continue |
| 146 if desired_targets and target_name not in desired_targets: | 146 if desired_targets and target_name not in desired_targets: |
| 147 # Our caller does not depend on this one | 147 # Our caller does not depend on this one |
| 148 continue | 148 continue |
| 149 # Add it to our known targets so we don't parse it again | 149 # Add it to our known targets so we don't parse it again |
| 150 var_dict.KNOWN_TARGETS.add(target_name) | 150 var_dict.KNOWN_TARGETS.add(target_name) |
| 151 | 151 |
| 152 parse_dictionary(var_dict, target, target_name, dest_dir) | 152 parse_dictionary(var_dict, target, target_name, dest_dir) |
| 153 | 153 |
| OLD | NEW |