summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rwxr-xr-x[-rw-r--r--]build/gyp_chromium25
-rw-r--r--o3d/DEPS_gyp7
-rwxr-xr-x[-rw-r--r--]o3d/build/gyp_o3d20
4 files changed, 34 insertions, 20 deletions
diff --git a/DEPS b/DEPS
index c694e27..ba82e1d 100644
--- a/DEPS
+++ b/DEPS
@@ -155,7 +155,7 @@ skip_child_includes = [
hooks = [
{
- # A change to a .gyp, .gypi, or to GYP itself shound run the generator.
+ # A change to a .gyp, .gypi, or to GYP itself should run the generator.
"pattern": "\\.gypi?$|[/\\\\]src[/\\\\]tools[/\\\\]gyp[/\\\\]|[/\\\\]src[/\\\\]build[/\\\\]gyp_chromium$",
"action": ["python", "src/build/gyp_chromium"],
},
diff --git a/build/gyp_chromium b/build/gyp_chromium
index 017d298..93687ce 100644..100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -1,7 +1,11 @@
#!/usr/bin/python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
# This script is wrapper for Chromium that adds some support for how GYP
-# is invoked by Chromium beyond what can be done it the gclient hooks.
+# is invoked by Chromium beyond what can be done in the gclient hooks.
import glob
import os
@@ -9,27 +13,32 @@ import shlex
import sys
print 'Updating projects from gyp files...'
+sys.stdout.flush()
+
+chrome_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir)
try:
import gyp
except ImportError, e:
- sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../tools/gyp/pylib'))
+ sys.path.append(os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
import gyp
if __name__ == '__main__':
args = sys.argv[1:]
# If we didn't get a file, check an env var, and then fall back to
- # assuming 'src/build/all.gyp'
+ # assuming 'src/build/all.gyp'. This can't have any backslashes as path
+ # separators even on Windows due to the use of shlex.split.
+ default_gyp_file = 'src/build/all.gyp'
if len(args) == 0:
args += shlex.split(os.environ.get('CHROMIUM_GYP_FILE',
- 'src/build/all.gyp'))
+ default_gyp_file))
+
+ # Always include common.gypi
+ args += ['-I', os.path.join(chrome_src, 'build', 'common.gypi')]
- # Always include gyp_chromium.gypi
- args += ['-I', os.path.join(os.path.dirname(sys.argv[0]),'common.gypi')]
-
# Optionally add supplemental .gypi files if present.
- supplements = glob.glob('src/*/supplement.gypi')
+ supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi'))
for supplement in supplements:
args += ['-I', supplement]
diff --git a/o3d/DEPS_gyp b/o3d/DEPS_gyp
index c8fef5c..43e1540 100644
--- a/o3d/DEPS_gyp
+++ b/o3d/DEPS_gyp
@@ -143,9 +143,8 @@ deps_os = {
hooks = [
{
- # A change to a .gyp, .gypi, or to GYP itself shound run the generator.
- "pattern": "\\.gypi?$|[/\\\\]src[/\\\\]tools[/\\\\]gyp[/\\\\]|MANIFEST$",
- "action": ["python", "build/gyp_o3d", "build/all.gyp", "--depth", ".",
- "-D", "mac_deployment_target=10.4"],
+ # A change to a .gyp, .gypi, or to GYP itself should run the generator.
+ "pattern": "\\.gypi?$|[/\\\\]src[/\\\\]tools[/\\\\]gyp[/\\\\]|[/\\\\]src[/\\\\]o3d[/\\\\]build[/\\\\]gyp_o3d$|MANIFEST$",
+ "action": ["python", "o3d/build/gyp_o3d", "o3d/build/all.gyp"],
},
]
diff --git a/o3d/build/gyp_o3d b/o3d/build/gyp_o3d
index 2603b29e..598dd70 100644..100755
--- a/o3d/build/gyp_o3d
+++ b/o3d/build/gyp_o3d
@@ -1,24 +1,30 @@
#!/usr/bin/python
-# This script is wrapper for O3D when compiling independently of chromium.
-# Like in chromium, the gyp_chromium.gypi include is forced in.
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script is wrapper for O3D when compiling independently of Chromium.
+# Like in Chromium, the common.gypi include is forced in.
-import glob
import os
-import shlex
import sys
+chrome_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir)
+
try:
import gyp
except ImportError, e:
- sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../../tools/gyp/pylib'))
+ sys.path.append(os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
import gyp
if __name__ == '__main__':
args = sys.argv[1:]
- # Always include gyp_chromium.gypi
- args += ['-I', os.path.join(os.path.dirname(sys.argv[0]),'../../build/gyp_chromium.gypi')]
+ # Always include common.gypi
+ args += ['--depth', '.',
+ '-I', os.path.join(chrome_src, 'build', 'common.gypi'),
+ '-D', 'mac_deployment_target=10.4']
# Off we go...
sys.exit(gyp.main(args))