summaryrefslogtreecommitdiffstats
path: root/build/android/gyp
diff options
context:
space:
mode:
authorkjellander <kjellander@chromium.org>2016-01-12 00:45:26 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-12 08:47:52 +0000
commit70ee602b6c186707286f9b5836a28311fe92e91e (patch)
treeb9a7a49caf3764b4ac41a8a420c77bd35d4e3a72 /build/android/gyp
parentefe2127d44f311fe1c0f547b8121dc85d8d3d679 (diff)
downloadchromium_src-70ee602b6c186707286f9b5836a28311fe92e91e.zip
chromium_src-70ee602b6c186707286f9b5836a28311fe92e91e.tar.gz
chromium_src-70ee602b6c186707286f9b5836a28311fe92e91e.tar.bz2
Remove assumption on absolute paths in java_cpp_enum.py.
In java_cpp_enum.py there were assumptions on 'build' being a component of the absolute path of the script invoking the script. This leads to problems when other projects are using the Chromium build toolchain (in this case libyuv), where the script invoking GYP is located in the root of the project dir (https://chromium.googlesource.com/libyuv/libyuv/+/master/gyp_libyuv). BUG=libyuv:536 Review URL: https://codereview.chromium.org/1571243003 Cr-Commit-Position: refs/heads/master@{#368829}
Diffstat (limited to 'build/android/gyp')
-rwxr-xr-xbuild/android/gyp/java_cpp_enum.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enum.py
index 9299bce..b304930d 100755
--- a/build/android/gyp/java_cpp_enum.py
+++ b/build/android/gyp/java_cpp_enum.py
@@ -229,10 +229,7 @@ class HeaderParser(object):
self._in_enum = True
def GetScriptName():
- script_components = os.path.abspath(sys.argv[0]).split(os.path.sep)
- build_index = script_components.index('build')
- return os.sep.join(script_components[build_index:])
-
+ return os.path.basename(os.path.abspath(sys.argv[0]))
def DoGenerate(source_paths):
for source_path in source_paths: