Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: platform_tools/android/gyp_gen/gypd_parser.py

Issue 282053002: Generate bench/Android.mk from gyp. (Closed) Base URL: https://skia.googlesource.com/skia.git@baselines
Patch Set: Remove modifications to generated files to submit. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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'):
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.
101 if rel_include is os.curdir:
102 continue
100 rel_include = os.path.join('$(LOCAL_PATH)', rel_include) 103 rel_include = os.path.join('$(LOCAL_PATH)', rel_include)
101 104
102 # Remove a trailing slash, if present. 105 # Remove a trailing slash, if present.
103 if rel_include.endswith('/'): 106 if rel_include.endswith('/'):
104 rel_include = rel_include[:-1] 107 rel_include = rel_include[:-1]
105 var_dict.LOCAL_C_INCLUDES.add(rel_include) 108 var_dict.LOCAL_C_INCLUDES.add(rel_include)
106 # For the top level, libskia, include directories should be exported. 109 # For the top level, libskia, include directories should be exported.
107 # FIXME (scroggo): Do not hard code this. 110 # FIXME (scroggo): Do not hard code this.
108 if current_target_name == 'libskia': 111 if current_target_name == 'libskia':
109 var_dict.LOCAL_EXPORT_C_INCLUDE_DIRS.add(rel_include) 112 var_dict.LOCAL_EXPORT_C_INCLUDE_DIRS.add(rel_include)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 # Avoid circular dependencies 144 # Avoid circular dependencies
142 continue 145 continue
143 if desired_targets and target_name not in desired_targets: 146 if desired_targets and target_name not in desired_targets:
144 # Our caller does not depend on this one 147 # Our caller does not depend on this one
145 continue 148 continue
146 # 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
147 var_dict.KNOWN_TARGETS.add(target_name) 150 var_dict.KNOWN_TARGETS.add(target_name)
148 151
149 parse_dictionary(var_dict, target, target_name, dest_dir) 152 parse_dictionary(var_dict, target, target_name, dest_dir)
150 153
OLDNEW
« no previous file with comments | « platform_tools/android/bin/gyp_to_android.py ('k') | platform_tools/android/gyp_gen/makefile_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698