linux: gyp should fail if the build dependencies aren't met.

The alternative is that gyp silently succeeds and your build mysteriously
doesn't link, even after you've installed the dependencies, and you need
to know to rerun "gclient runhooks --force".

BUG=11432

Review URL: http://codereview.chromium.org/114007

git-svn-id: http://src.chromium.org/svn/trunk/src/build@16002 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
evan@chromium.org 2009-05-13 21:34:35 +00:00
Родитель 6ba709dd78
Коммит a20f5da0e2
2 изменённых файлов: 24 добавлений и 54 удалений

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

@ -1,30 +0,0 @@
#!/bin/env 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.
__doc__ = """
Wrapper script for executing pkg-config with the arguments supplied
on the command line and suppressing the exit status and error output
when the error is simply that the specified package isn't installed.
"""
import sys
import subprocess
p = subprocess.Popen(['pkg-config'] + sys.argv[1:],
stderr=subprocess.PIPE)
(stdout, stderr) = p.communicate()
exit_status = p.wait()
if exit_status == 1:
import re
if re.search('No package.*found', stderr):
# Exit status of 1 with a presumably "normal" not found message.
# Just swallow the "error."
sys.exit(0)
sys.stderr.write(stderr)
sys.exit(exit_status)

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

@ -9,15 +9,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags gtk+-2.0)',
'<!@(pkg-config --cflags gtk+-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other gtk+-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l gtk+-2.0)',
'<!@(pkg-config --libs-only-l gtk+-2.0)',
],
},
},
@ -26,15 +26,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags nss)',
'<!@(pkg-config --cflags nss)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other nss)',
'<!@(pkg-config --libs-only-L --libs-only-other nss)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l nss)',
'<!@(pkg-config --libs-only-l nss)',
],
},
},
@ -43,15 +43,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags freetype2)',
'<!@(pkg-config --cflags freetype2)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other freetype2)',
'<!@(pkg-config --libs-only-L --libs-only-other freetype2)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l freetype2)',
'<!@(pkg-config --libs-only-l freetype2)',
],
},
},
@ -60,15 +60,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags fontconfig)',
'<!@(pkg-config --cflags fontconfig)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other fontconfig)',
'<!@(pkg-config --libs-only-L --libs-only-other fontconfig)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l fontconfig)',
'<!@(pkg-config --libs-only-l fontconfig)',
],
},
},
@ -77,15 +77,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags gdk-2.0)',
'<!@(pkg-config --cflags gdk-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other gdk-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other gdk-2.0)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l gdk-2.0)',
'<!@(pkg-config --libs-only-l gdk-2.0)',
],
},
},
@ -94,15 +94,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags gconf-2.0)',
'<!@(pkg-config --cflags gconf-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other gconf-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other gconf-2.0)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l gconf-2.0)',
'<!@(pkg-config --libs-only-l gconf-2.0)',
],
},
},
@ -111,15 +111,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags gthread-2.0)',
'<!@(pkg-config --cflags gthread-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other gthread-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other gthread-2.0)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l gthread-2.0)',
'<!@(pkg-config --libs-only-l gthread-2.0)',
],
},
},
@ -128,15 +128,15 @@
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python pkg_config_wrapper.py --cflags x11)',
'<!@(pkg-config --cflags x11)',
],
},
'link_settings': {
'ldflags': [
'<!@(python pkg_config_wrapper.py --libs-only-L --libs-only-other x11)',
'<!@(pkg-config --libs-only-L --libs-only-other x11)',
],
'libraries': [
'<!@(python pkg_config_wrapper.py --libs-only-l x11)',
'<!@(pkg-config --libs-only-l x11)',
],
},
},