Index: pylib/gyp/generator/make.py |
=================================================================== |
--- pylib/gyp/generator/make.py (revision 1462) |
+++ pylib/gyp/generator/make.py (working copy) |
@@ -1999,14 +1999,23 @@ |
build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) |
make_global_settings_dict = data[build_file].get('make_global_settings', {}) |
+ wrappers = {} |
+ wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command |
+ for key, value in make_global_settings_dict: |
+ m = re.match('(.*)_wrapper', key) |
Nico
2013/02/19 17:21:30
if key.endswith('_wrapper'):
wrappers[key[0:len(
ukai
2013/02/20 07:22:53
key[0:len(key)-len('_wrapper')] ?
Nico
2013/02/20 09:12:40
err yes :-)
Sam Clegg
2013/02/20 19:55:20
I think you can just do:
key[:-len('_wrapper')]
ukai
2013/02/21 06:41:44
Done.
|
+ if m: |
+ wrappers[m.group(1)] = '$(abspath %s)' % value |
make_global_settings = '' |
for key, value in make_global_settings_dict: |
+ if re.match('.*_wrapper', key): |
+ continue |
if value[0] != '$': |
value = '$(abspath %s)' % value |
- if key == 'LINK': |
- make_global_settings += ('%s ?= %s $(builddir)/linker.lock %s\n' % |
- (key, flock_command, value)) |
- elif key in ['CC', 'CXX']: |
+ wrapper = wrappers.get(key) |
+ if wrapper: |
+ value = '%s %s' % (wrapper, value) |
+ del wrappers[key] |
+ if key in ['CC', 'CXX']: |
make_global_settings += ( |
'ifneq (,$(filter $(origin %s), undefined default))\n' % key) |
# Let gyp-time envvars win over global settings. |
@@ -2016,6 +2025,9 @@ |
make_global_settings += 'endif\n' |
else: |
make_global_settings += '%s ?= %s\n' % (key, value) |
+ # TODO(ukai): define cmd which wrapper only is specified in |
Nico
2013/02/19 17:21:30
s/which/when/
s/wrapper only/only wrapper/
ukai
2013/02/20 07:22:53
Done.
|
+ # make_global_settings. |
+ |
header_params['make_global_settings'] = make_global_settings |
ensure_directory_exists(makefile_path) |