| Index: build/gyp_nacl
|
| diff --git a/build/gyp_nacl b/build/gyp_nacl
|
| index fb7acd1630074b372605bc342382c72204bb64bf..f28793f5fbf8467509cefa7bc4853cc59a980027 100755
|
| --- a/build/gyp_nacl
|
| +++ b/build/gyp_nacl
|
| @@ -8,14 +8,16 @@ import os
|
| import shlex
|
| import sys
|
|
|
| -print 'Updating projects from gyp files...'
|
| +script_dir = os.path.dirname(os.path.abspath(__file__))
|
| +chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
|
| +
|
| +sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
|
| +import gyp
|
| +
|
| +
|
| +# Add paths so that pymod_do_main(...) can import files.
|
| +sys.path.insert(1, os.path.join(script_dir))
|
|
|
| -try:
|
| - import gyp
|
| -except ImportError, e:
|
| - sys.path.append(os.path.join(os.path.dirname(sys.argv[0]),
|
| - '..', '..', 'tools', 'gyp', 'pylib'))
|
| - import gyp
|
|
|
| if __name__ == '__main__':
|
| args = sys.argv[1:]
|
| @@ -23,17 +25,22 @@ if __name__ == '__main__':
|
| # If we didn't get a file, check an env var, and then fall back to
|
| # assuming 'src/build/all.gyp'
|
| if len(args) == 0:
|
| - args += shlex.split(os.environ.get('NACL_GYP_FILE',
|
| - 'native_client/build/all.gyp'))
|
| + args += shlex.split(os.environ.get(
|
| + 'NACL_GYP_FILE',
|
| + os.path.join(script_dir, 'all.gyp').replace('\\', '/')))
|
|
|
| - # Add in configs.gypi
|
| - args += ['-I', 'native_client/build/configs.gypi']
|
| + # Add in common.gypi
|
| + args += ['-I', os.path.join(chrome_src,
|
| + 'build/common.gypi').replace('\\', '/')]
|
|
|
| # Pick depth explicitly.
|
| - args += ['--depth', '.']
|
| + args += ['--depth', chrome_src]
|
|
|
| # Building NaCl as standalone (not as part of Chrome)
|
| args += ['-D', 'nacl_standalone=1']
|
|
|
| + print 'Updating projects from gyp files...'
|
| + sys.stdout.flush()
|
| +
|
| # Off we go...
|
| sys.exit(gyp.main(args))
|
|
|