summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 23:21:55 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 23:21:55 +0000
commitb26ac2f54696af35118a6b0944c9ce697fb62b34 (patch)
tree48f65d97f1d51759a7132b15e23b9a3f5da37f88 /webkit
parent12763298e2de86b04d0bc9ffea8a1a450ef314c2 (diff)
downloadchromium_src-b26ac2f54696af35118a6b0944c9ce697fb62b34.zip
chromium_src-b26ac2f54696af35118a6b0944c9ce697fb62b34.tar.gz
chromium_src-b26ac2f54696af35118a6b0944c9ce697fb62b34.tar.bz2
Fix paths to third_party/WebKit/Platform on Windows upstream checkouts.
On Windows, we were assuming that all the header files were in Source/WebKit/chromium, but the Platform headers are not. To fix, we pass in the directory we want to be relative to and prepend that to the include path. BUG=None Review URL: http://codereview.chromium.org/9166020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/support/setup_third_party.gyp1
-rwxr-xr-xwebkit/support/setup_third_party.py14
2 files changed, 11 insertions, 4 deletions
diff --git a/webkit/support/setup_third_party.gyp b/webkit/support/setup_third_party.gyp
index 3b83fce..7fc15ac 100644
--- a/webkit/support/setup_third_party.gyp
+++ b/webkit/support/setup_third_party.gyp
@@ -50,6 +50,7 @@
'setup_headers',
'<(DEPTH)/../../Platform/chromium/public',
'<(platform_api_dest)',
+ '<(DEPTH)',
],
'message': 'Generating forwarding headers for third_party/WebKit/Source/Platform/chromium/public',
},
diff --git a/webkit/support/setup_third_party.py b/webkit/support/setup_third_party.py
index fcfae06..e98eb69 100755
--- a/webkit/support/setup_third_party.py
+++ b/webkit/support/setup_third_party.py
@@ -58,18 +58,22 @@ def SetupHeaders(args):
from output dir to files in input dir.
args: A list with 2 values, the input dir and the output dir.
Returns: 0 on success, other value on error."""
- if len(args) != 2:
- print "'setup_headers' expects an input directory and an output directory."
+ if len(args) != 2 and len(args) != 3:
+ print ("'setup_headers' expects an input directory, an output directory, ."
+ "and an optional directory to make includes relative to.")
return -1
base_input_dir = args[0]
output_dir = args[1]
+ relative_to_dir = None
+ if len(args) == 3:
+ relative_to_dir = args[2]
input_files = GetHeaderFilesInDir(base_input_dir)
for input_filename in input_files:
rel_path = input_filename[len(base_input_dir) + 1:]
out_filename = os.path.join(output_dir, rel_path)
TryToMakeDir(os.path.split(out_filename)[0])
- WriteSetupFilename(input_filename, out_filename)
+ WriteSetupFilename(input_filename, out_filename, relative_to_dir)
def TryToMakeDir(dir_name):
@@ -90,7 +94,7 @@ def NormalizePath(path):
return os.path.join(drive.lower(), rest)
-def WriteSetupFilename(input_filename, out_filename):
+def WriteSetupFilename(input_filename, out_filename, relative_to_dir):
"""Create a forwarding header from out_filename to input_filename."""
# Figure out the relative path from out_filename to input_filename.
# We can't use os.path.relpath since that's a python2.6 feature and we
@@ -112,6 +116,8 @@ def WriteSetupFilename(input_filename, out_filename):
# relative path, just write the path relative to the WebKit/chromium dir,
# which is in the include path.
rel_path = input_filename[len(ancestor):]
+ if relative_to_dir:
+ rel_path = os.path.join(relative_to_dir, rel_path)
else:
rel_path = os.path.join('/'.join(['..'] * num_parent_dirs),
input_filename[len(ancestor):])