Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: build/gyp_nacl

Issue 10831270: Eliminate build differences in nacl gated on nacl_standalone. Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/external_code.gypi ('k') | buildbot/buildbot_lib.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # This script is wrapper for NaCl that adds some support for how GYP 3 # This script is wrapper for NaCl that adds some support for how GYP
4 # is invoked by NaCl beyond what can be done it the gclient hooks. 4 # is invoked by NaCl beyond what can be done it the gclient hooks.
5 5
6 import glob 6 import glob
7 import os 7 import os
8 import shlex 8 import shlex
9 import sys 9 import sys
10 10
11 print 'Updating projects from gyp files...' 11 script_dir = os.path.dirname(os.path.abspath(__file__))
12 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
12 13
13 try: 14 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
14 import gyp 15 import gyp
15 except ImportError, e: 16
16 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 17
17 '..', '..', 'tools', 'gyp', 'pylib')) 18 # Add paths so that pymod_do_main(...) can import files.
18 import gyp 19 sys.path.insert(1, os.path.join(script_dir))
20
19 21
20 if __name__ == '__main__': 22 if __name__ == '__main__':
21 args = sys.argv[1:] 23 args = sys.argv[1:]
22 24
23 # If we didn't get a file, check an env var, and then fall back to 25 # If we didn't get a file, check an env var, and then fall back to
24 # assuming 'src/build/all.gyp' 26 # assuming 'src/build/all.gyp'
25 if len(args) == 0: 27 if len(args) == 0:
26 args += shlex.split(os.environ.get('NACL_GYP_FILE', 28 args += shlex.split(os.environ.get(
27 'native_client/build/all.gyp')) 29 'NACL_GYP_FILE',
30 os.path.join(script_dir, 'all.gyp').replace('\\', '/')))
28 31
29 # Add in configs.gypi 32 # Add in common.gypi
30 args += ['-I', 'native_client/build/configs.gypi'] 33 args += ['-I', os.path.join(chrome_src,
34 'build/common.gypi').replace('\\', '/')]
31 35
32 # Pick depth explicitly. 36 # Pick depth explicitly.
33 args += ['--depth', '.'] 37 args += ['--depth', chrome_src]
34 38
35 # Building NaCl as standalone (not as part of Chrome) 39 # Building NaCl as standalone (not as part of Chrome)
36 args += ['-D', 'nacl_standalone=1'] 40 args += ['-D', 'nacl_standalone=1']
37 41
42 print 'Updating projects from gyp files...'
43 sys.stdout.flush()
44
38 # Off we go... 45 # Off we go...
39 sys.exit(gyp.main(args)) 46 sys.exit(gyp.main(args))
OLDNEW
« no previous file with comments | « build/external_code.gypi ('k') | buildbot/buildbot_lib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698