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: http://src.chromium.org/svn/trunk/src/build@26302 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
yaar@chromium.org 2009-09-15 23:52:14 +00:00
Родитель d1aa7bfdd6
Коммит 348eca2172
8 изменённых файлов: 50 добавлений и 25 удалений

Просмотреть файл

@ -3,9 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes': [
'common.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'All', 'target_name': 'All',

Просмотреть файл

@ -2,6 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # 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': { 'variables': {
# .gyp files should set chromium_code to 1 if they build Chromium-specific # .gyp files should set chromium_code to 1 if they build Chromium-specific

37
gyp_chromium Normal file
Просмотреть файл

@ -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))

Просмотреть файл

@ -3,18 +3,18 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables' : { 'conditions': [
'includes': [ ['sysroot!=""', {
'../common.gypi', 'variables': {
],
'conditions': [
['sysroot!=""', {
'pkg-config': './pkg-config-wrapper "<(sysroot)"', 'pkg-config': './pkg-config-wrapper "<(sysroot)"',
}, { },
}, {
'variables': {
'pkg-config': 'pkg-config' 'pkg-config': 'pkg-config'
}], },
], }],
}, ],
'targets': [ 'targets': [
{ {
'target_name': 'gtk', 'target_name': 'gtk',

Просмотреть файл

@ -7,9 +7,6 @@
'variables': { 'variables': {
'chromium_code': 1, 'chromium_code': 1,
}, },
'includes': [
'../common.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'googleurl', 'target_name': 'googleurl',

Просмотреть файл

@ -3,9 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes': [
'../common.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'pdfsqueeze', 'target_name': 'pdfsqueeze',

Просмотреть файл

@ -3,9 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes': [
'../common.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'lastchange', 'target_name': 'lastchange',

Просмотреть файл

@ -3,9 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes': [
'../common.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'cygwin', 'target_name': 'cygwin',