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

Side by Side Diff: pylib/gyp/generator/make.py

Issue 1887593002: Fall back to env before using static defaults Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Created 4 years, 8 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) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. 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 # Notes: 5 # Notes:
6 # 6 #
7 # This is all roughly based on the Makefile system used by the Linux 7 # This is all roughly based on the Makefile system used by the Linux
8 # kernel, but is a non-recursive make -- we put the entire dependency 8 # kernel, but is a non-recursive make -- we put the entire dependency
9 # graph in front of make and let it figure it out. 9 # graph in front of make and let it figure it out.
10 # 10 #
(...skipping 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 'link_commands': LINK_COMMANDS_AIX, 2056 'link_commands': LINK_COMMANDS_AIX,
2057 'flock': './gyp-flock-tool flock', 2057 'flock': './gyp-flock-tool flock',
2058 'flock_index': 2, 2058 'flock_index': 2,
2059 }) 2059 })
2060 2060
2061 header_params.update({ 2061 header_params.update({
2062 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), 2062 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'),
2063 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), 2063 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
2064 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), 2064 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
2065 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'), 2065 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
2066 'CC.host': GetEnvironFallback(('CC_host',), 'gcc'), 2066 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
2067 'AR.host': GetEnvironFallback(('AR_host',), 'ar'), 2067 'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
2068 'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'), 2068 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
2069 'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'), 2069 'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
2070 }) 2070 })
2071 2071
2072 build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) 2072 build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
2073 make_global_settings_array = data[build_file].get('make_global_settings', []) 2073 make_global_settings_array = data[build_file].get('make_global_settings', [])
2074 wrappers = {} 2074 wrappers = {}
2075 for key, value in make_global_settings_array: 2075 for key, value in make_global_settings_array:
2076 if key.endswith('_wrapper'): 2076 if key.endswith('_wrapper'):
2077 wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value 2077 wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value
2078 make_global_settings = '' 2078 make_global_settings = ''
2079 for key, value in make_global_settings_array: 2079 for key, value in make_global_settings_array:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 root_makefile.write("endif\n") 2209 root_makefile.write("endif\n")
2210 root_makefile.write('\n') 2210 root_makefile.write('\n')
2211 2211
2212 if (not generator_flags.get('standalone') 2212 if (not generator_flags.get('standalone')
2213 and generator_flags.get('auto_regeneration', True)): 2213 and generator_flags.get('auto_regeneration', True)):
2214 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) 2214 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)
2215 2215
2216 root_makefile.write(SHARED_FOOTER) 2216 root_makefile.write(SHARED_FOOTER)
2217 2217
2218 root_makefile.close() 2218 root_makefile.close()
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