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

Unified Diff: pylib/gyp/generator/make.py

Issue 7779041: Let environment variables override make_global_settings. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/make.py
===================================================================
--- pylib/gyp/generator/make.py (revision 1030)
+++ pylib/gyp/generator/make.py (working copy)
@@ -2454,9 +2454,17 @@
if value[0] != '$':
value = '$(abspath %s)' % value
if key == 'LINK':
- make_global_settings += '%s = $(FLOCK) %s\n' % (key, value)
+ make_global_settings += '%s ?= $(FLOCK) %s\n' % (key, value)
+ elif key in ['CC', 'CXX']:
+ make_global_settings += (
+ 'ifneq (,$(filter $(origin %s), undefined default))\n' % key)
+ # Let gyp-time envvars win over global settings.
+ if key in os.environ:
+ value = os.environ[key]
+ make_global_settings += ' %s = %s\n' % (key, value)
+ make_global_settings += 'endif\n'
else:
- make_global_settings += '%s = %s\n' % (key, value)
+ make_global_settings += '%s ?= %s\n' % (key, value)
header_params['make_global_settings'] = make_global_settings
ensure_directory_exists(makefile_path)
« 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