diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 18:10:25 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 18:10:25 +0000 |
commit | 2e981ac35da47f84ee5a197e4a54a9f69a3b825d (patch) | |
tree | e69d3b06a1a4cfd474a3fbc98ffb2085822e9f1f /tools/swig | |
parent | a677692d41dc6843fd85e4507f8ec2a1f378be4a (diff) | |
download | chromium_src-2e981ac35da47f84ee5a197e4a54a9f69a3b825d.zip chromium_src-2e981ac35da47f84ee5a197e4a54a9f69a3b825d.tar.gz chromium_src-2e981ac35da47f84ee5a197e4a54a9f69a3b825d.tar.bz2 |
- Update README.chromium to mention change to swig libs in third_party
- Provide platform-specific macros to swig.
- Update DEPS to use right swig updates
To be committed _after_ accompanying CL: http://codereview.chromium.org/661334
BUG=32285
TEST=None
Review URL: http://codereview.chromium.org/661342
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/swig')
-rwxr-xr-x | tools/swig/swig.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/swig/swig.py b/tools/swig/swig.py index 332ec2a..6ad9fdf 100755 --- a/tools/swig/swig.py +++ b/tools/swig/swig.py @@ -13,6 +13,7 @@ Depends on swig binaries being available at ../../third_party/swig. """ import os +import subprocess import sys @@ -25,10 +26,19 @@ def main(): 'darwin': 'mac', 'linux2': 'linux', 'win32': 'win', - 'cygwin': 'win', + } + # Swig documentation lies that platform macros are provided to swig + # preprocessor. Provide them ourselves. + platform_flags = { + 'darwin': '-DSWIGMAC', + 'linux2': '-DSWIGLINUX', + 'win32': '-DSWIGWIN', } swig_bin = os.path.join(swig_dir, dir_map[sys.platform], 'swig') - os.execv(swig_bin, [swig_bin] + sys.argv[1:]) + args = [swig_bin, platform_flags[sys.platform]] + sys.argv[1:] + args = [x.replace('/', os.sep) for x in args] + print "Executing", args + sys.exit(subprocess.call(args)) if __name__ == "__main__": |