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

Side by Side Diff: build/gyp_helper.py

Issue 931643002: gyp: chromium.gyp_env behaves like .gyp/include.gypi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: preserve overriding order Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file helps gyp_chromium and landmines correctly set up the gyp 5 # This file helps gyp_chromium and landmines correctly set up the gyp
6 # environment from chromium.gyp_env on disk 6 # environment from chromium.gyp_env on disk
7 7
8 import os 8 import os
9 9
10 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) 10 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
(...skipping 24 matching lines...) Expand all
35 'GYP_GENERATOR_OUTPUT', 35 'GYP_GENERATOR_OUTPUT',
36 'GYP_GENERATORS', 36 'GYP_GENERATORS',
37 'GYP_INCLUDE_FIRST', 37 'GYP_INCLUDE_FIRST',
38 'GYP_INCLUDE_LAST', 38 'GYP_INCLUDE_LAST',
39 'GYP_MSVS_VERSION', 39 'GYP_MSVS_VERSION',
40 ) 40 )
41 for var in supported_vars: 41 for var in supported_vars:
42 file_val = file_data.get(var) 42 file_val = file_data.get(var)
43 if file_val: 43 if file_val:
44 if var in os.environ: 44 if var in os.environ:
45 print 'INFO: Environment value for "%s" overrides value in %s.' % ( 45 os.environ[var] = file_val + ' ' + os.environ[var];
scottmg 2015/02/25 19:58:20 merging with a space seems wrong? e.g. GYP_GENERAT
dshwang 2015/02/26 09:30:30 I only applied this change to GYP_DEFINES in next
46 print 'INFO: Environment value for "%s" overrides value in %s' % (
scottmg 2015/02/25 19:58:20 This print seems incorrect now.
dshwang 2015/02/26 09:30:30 yes, only GYP_DEFINES is overriden. other env valu
46 var, os.path.abspath(file_path) 47 var, os.path.abspath(file_path)
47 ) 48 )
48 else: 49 else:
49 os.environ[var] = file_val 50 os.environ[var] = file_val
50 51
51 52
52 def apply_chromium_gyp_env(): 53 def apply_chromium_gyp_env():
53 if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ: 54 if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ:
54 # Update the environment based on chromium.gyp_env 55 # Update the environment based on chromium.gyp_env
55 path = os.path.join(os.path.dirname(CHROME_SRC), 'chromium.gyp_env') 56 path = os.path.join(os.path.dirname(CHROME_SRC), 'chromium.gyp_env')
56 apply_gyp_environment_from_file(path) 57 apply_gyp_environment_from_file(path)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698