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

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

Issue 11031005: Add "standalone_static_library" flag (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 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 import gyp 5 import gyp
6 import gyp.common 6 import gyp.common
7 import gyp.SCons as SCons 7 import gyp.SCons as SCons
8 import os.path 8 import os.path
9 import pprint 9 import pprint
10 import re 10 import re
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 if not spec.has_key('libraries'): 1025 if not spec.has_key('libraries'):
1026 spec['libraries'] = [] 1026 spec['libraries'] = []
1027 1027
1028 # Add dependent static library targets to the 'libraries' value. 1028 # Add dependent static library targets to the 'libraries' value.
1029 deps = spec.get('dependencies', []) 1029 deps = spec.get('dependencies', [])
1030 spec['scons_dependencies'] = [] 1030 spec['scons_dependencies'] = []
1031 for d in deps: 1031 for d in deps:
1032 td = target_dicts[d] 1032 td = target_dicts[d]
1033 target_name = td['target_name'] 1033 target_name = td['target_name']
1034 spec['scons_dependencies'].append("Alias('%s')" % target_name) 1034 spec['scons_dependencies'].append("Alias('%s')" % target_name)
1035 if td['type'] in ('static_library', 'shared_library'): 1035 if td['type'] in ('static_library', 'shared_library',
1036 'standalone_static_library'):
1036 libname = td.get('product_name', target_name) 1037 libname = td.get('product_name', target_name)
1037 spec['libraries'].append('lib' + libname) 1038 spec['libraries'].append('lib' + libname)
1038 if td['type'] == 'loadable_module': 1039 if td['type'] == 'loadable_module':
1039 prereqs = spec.get('scons_prerequisites', []) 1040 prereqs = spec.get('scons_prerequisites', [])
1040 # TODO: parameterize with <(SHARED_LIBRARY_*) variables? 1041 # TODO: parameterize with <(SHARED_LIBRARY_*) variables?
1041 td_target = SCons.Target(td) 1042 td_target = SCons.Target(td)
1042 td_target.target_prefix = '${SHLIBPREFIX}' 1043 td_target.target_prefix = '${SHLIBPREFIX}'
1043 td_target.target_suffix = '${SHLIBSUFFIX}' 1044 td_target.target_suffix = '${SHLIBSUFFIX}'
1044 1045
1045 GenerateSConscript(output_file, spec, build_file, data[build_file]) 1046 GenerateSConscript(output_file, spec, build_file, data[build_file])
(...skipping 17 matching lines...) Expand all
1063 bf, target = gyp.common.ParseQualifiedTarget(t)[:2] 1064 bf, target = gyp.common.ParseQualifiedTarget(t)[:2]
1064 target_filename = TargetFilename(target, bf, options.suffix) 1065 target_filename = TargetFilename(target, bf, options.suffix)
1065 tpath = gyp.common.RelativePath(target_filename, output_dir) 1066 tpath = gyp.common.RelativePath(target_filename, output_dir)
1066 sconscript_files[target] = tpath 1067 sconscript_files[target] = tpath
1067 1068
1068 output_filename = output_path(output_filename) 1069 output_filename = output_path(output_filename)
1069 if sconscript_files: 1070 if sconscript_files:
1070 GenerateSConscriptWrapper(build_file, data[build_file], basename, 1071 GenerateSConscriptWrapper(build_file, data[build_file], basename,
1071 output_filename, sconscript_files, 1072 output_filename, sconscript_files,
1072 default_configuration) 1073 default_configuration)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698