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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/external_code.gypi ('k') | buildbot/buildbot_lib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« 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