diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 20:00:20 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 20:00:20 +0000 |
commit | 285c4d949ba2831ddfcca84fca818d4028654cd9 (patch) | |
tree | a65af7975ee50411ab5b420177f075be2fed793d /webkit | |
parent | 3b17243f61c316bdf8ccb60823e3723bad46b817 (diff) | |
download | chromium_src-285c4d949ba2831ddfcca84fca818d4028654cd9.zip chromium_src-285c4d949ba2831ddfcca84fca818d4028654cd9.tar.gz chromium_src-285c4d949ba2831ddfcca84fca818d4028654cd9.tar.bz2 |
Fix bindings generation to pass in POSIX-style / separators in paths.
(Patch from Brad Nelson @ google.com, pending chromium.org.)
Review URL: http://codereview.chromium.org/4071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/build/port/SConscript | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/webkit/build/port/SConscript b/webkit/build/port/SConscript index aa78b11..11419ed 100644 --- a/webkit/build/port/SConscript +++ b/webkit/build/port/SConscript @@ -19,6 +19,20 @@ webkit_build = env.Dir('#../webkit/build') bindings_output_dir = env.Dir('#/../webkit/$BUILD_TYPE/scons/V8Bindings') +def PosixIncludes(env, prefix, files, suffix): + # This is basically a custom version of the _concat() function, + # which we need because the binding script needs posix style paths, + # even on windows, and _concat() doesn't make that easy to do... :-( + # + # Note that because we're not using the RDirs function that the + # normal _concat() call uses, this will only add the build + # directory paths, not the paths in the underlying source directory, + # to its list. + posix_files = [str(env.Dir(f).abspath).replace('\\', '/') for f in files] + combined = [prefix + f + suffix for f in posix_files] + return ' '.join(combined) + + env = env.Clone( WEBCORE = webcore, PENDING = pending, @@ -66,10 +80,11 @@ env = env.Clone( ], BINDINGS_INCLUDE_FLAG = '--include ', BINDINGS_INCLUDE_SUFFIX = '', - _BINDINGS_INCLUDE_FLAGS = '${_concat(BINDINGS_INCLUDE_FLAG, ' + \ - 'BINDINGS_INCLUDE_PATH, ' + \ - 'BINDINGS_INCLUDE_SUFFIX, ' + \ - '__env__, RDirs, TARGET, SOURCE)}', + _posix_includes = PosixIncludes, + _BINDINGS_INCLUDE_FLAGS = '${_posix_includes(__env__, ' + \ + 'BINDINGS_INCLUDE_FLAG, ' + \ + 'BINDINGS_INCLUDE_PATH, ' + \ + 'BINDINGS_INCLUDE_SUFFIX)}', ) env.PrependENVPath('PATH', cygwin_posix) @@ -106,7 +121,7 @@ env.Append( env.Replace( # TODO(bradnelson): fix ugly hack with one include! BINDINGSCOM = '$PERL $_PERL_INCLUDE_FLAGS ' + \ - '${SOURCES[1]} ' + \ + '${SOURCES[1].posix} ' + \ '--defines "$FEATURE_DEFINES $BINDINGS_LANGUAGE" ' + \ '--generator $BINDINGS_GENERATOR_ARG ' + \ '$_BINDINGS_INCLUDE_FLAGS ' + \ |