summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authoryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 23:52:14 +0000
committeryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 23:52:14 +0000
commit21642abd8a9957b2b86380419dfbfdeae479dcc7 (patch)
tree59720a3453814c8d334b78ca3b44d7ae28e31e03 /build
parentcd05e24cfc1f743ef37a050a35be367590ccd587 (diff)
downloadchromium_src-21642abd8a9957b2b86380419dfbfdeae479dcc7.zip
chromium_src-21642abd8a9957b2b86380419dfbfdeae479dcc7.tar.gz
chromium_src-21642abd8a9957b2b86380419dfbfdeae479dcc7.tar.bz2
Force inclusion of build/common.gypi for all chromium gyp files.
Why: Simpler build code. If everybody includes it, it should be included automatically. Why now: The webkit chromium builds need it be specified, since can't default to build/common.gypi. What was done: 1. build/common.gypi's contents were moved to a new file build/gyp_chromium.gypi 2. tools/gyp/gyp_chromium was moved to build/gyp_chromium and made to automatically include build/gyp_chromium.gypi. 3. lots of gyp files were fixed to not refer to build/common.gypi any more. 4. o3d which also builds independently of chrome, was fixed to have a gyp_o3d that includes gyp_chromium.gypi too. 5. build/common.gypi was left empty, because there are some external projects that still refer to it. Things that are left to do after this patch is in: 1. The following external files (in other repositories) need to stop include common.gypi ./third_party/hunspell/hunspell.gyp ./third_party/icu/icu.gyp ./v8/tools/gyp/v8.gyp 2. Once nobody refers to common.gypi anymore, delete common.gypi -or- Delete gyp_chromium.gypi and move its content back to common.gypi Tested on mac, win and linux. On win, got a few unit tests errors on chrome bookmarks, which should not be related. I'm running again with clobber to verify. Review URL: http://codereview.chromium.org/206006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/all.gyp3
-rw-r--r--build/common.gypi3
-rw-r--r--build/gyp_chromium37
-rw-r--r--build/linux/system.gyp20
-rw-r--r--build/temp_gyp/googleurl.gyp3
-rw-r--r--build/temp_gyp/pdfsqueeze.gyp3
-rw-r--r--build/util/build_util.gyp3
-rw-r--r--build/win/system.gyp3
8 files changed, 50 insertions, 25 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 8752c1f..ca1666d 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -3,9 +3,6 @@
# found in the LICENSE file.
{
- 'includes': [
- 'common.gypi',
- ],
'targets': [
{
'target_name': 'All',
diff --git a/build/common.gypi b/build/common.gypi
index 757c8c5..5b2d0b6 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2,6 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# IMPORTANT:
+# Please don't directly include this file if you are building via gyp_chromium,
+# since gyp_chromium is automatically forcing its inclusion.
{
'variables': {
# .gyp files should set chromium_code to 1 if they build Chromium-specific
diff --git a/build/gyp_chromium b/build/gyp_chromium
new file mode 100644
index 0000000..017d298
--- /dev/null
+++ b/build/gyp_chromium
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+# 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.
+
+import glob
+import os
+import shlex
+import sys
+
+print 'Updating projects from gyp files...'
+
+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:]
+
+ # 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('CHROMIUM_GYP_FILE',
+ 'src/build/all.gyp'))
+
+ # 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')
+ for supplement in supplements:
+ args += ['-I', supplement]
+
+ # Off we go...
+ sys.exit(gyp.main(args))
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 5275373..6bed8e3 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -3,18 +3,18 @@
# found in the LICENSE file.
{
- 'variables' : {
- 'includes': [
- '../common.gypi',
- ],
- 'conditions': [
- ['sysroot!=""', {
+ 'conditions': [
+ ['sysroot!=""', {
+ 'variables': {
'pkg-config': './pkg-config-wrapper "<(sysroot)"',
- }, {
+ },
+ }, {
+ 'variables': {
'pkg-config': 'pkg-config'
- }],
- ],
- },
+ },
+ }],
+ ],
+
'targets': [
{
'target_name': 'gtk',
diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp
index 4fbab83..ef958bd 100644
--- a/build/temp_gyp/googleurl.gyp
+++ b/build/temp_gyp/googleurl.gyp
@@ -7,9 +7,6 @@
'variables': {
'chromium_code': 1,
},
- 'includes': [
- '../common.gypi',
- ],
'targets': [
{
'target_name': 'googleurl',
diff --git a/build/temp_gyp/pdfsqueeze.gyp b/build/temp_gyp/pdfsqueeze.gyp
index 1478410..2b3b1ff 100644
--- a/build/temp_gyp/pdfsqueeze.gyp
+++ b/build/temp_gyp/pdfsqueeze.gyp
@@ -3,9 +3,6 @@
# found in the LICENSE file.
{
- 'includes': [
- '../common.gypi',
- ],
'targets': [
{
'target_name': 'pdfsqueeze',
diff --git a/build/util/build_util.gyp b/build/util/build_util.gyp
index ad17be6..1d867cc 100644
--- a/build/util/build_util.gyp
+++ b/build/util/build_util.gyp
@@ -3,9 +3,6 @@
# found in the LICENSE file.
{
- 'includes': [
- '../common.gypi',
- ],
'targets': [
{
'target_name': 'lastchange',
diff --git a/build/win/system.gyp b/build/win/system.gyp
index 75db468..bc29e82 100644
--- a/build/win/system.gyp
+++ b/build/win/system.gyp
@@ -3,9 +3,6 @@
# found in the LICENSE file.
{
- 'includes': [
- '../common.gypi',
- ],
'targets': [
{
'target_name': 'cygwin',