else: actual_type = 'STATIC_LIB' prop_set = prop_set.add_raw(['<main-target-type>LIB']) # Construct the target. return generators.construct(project, name, actual_type, prop_set, sources) def viable_source_types(self): return ['*'] generators.register(LibGenerator("builtin.lib-generator")) generators.override("builtin.prebuilt", "builtin.lib-generator") def lib(names, sources=[], requirements=[], default_build=[], usage_requirements=[]): """The implementation of the 'lib' rule. Beyond standard syntax that rule allows simplified: 'lib a b c ;'.""" assert is_iterable_typed(names, basestring) assert is_iterable_typed(sources, basestring) assert is_iterable_typed(requirements, basestring) assert is_iterable_typed(default_build, basestring) assert is_iterable_typed(usage_requirements, basestring) if len(names) > 1:
__debug = None def debug(): global __debug if __debug is None: __debug = "--debug-configuration" in bjam.variable("ARGV") return __debug feature.extend('toolset', ['gcc']) toolset.inherit_generators('gcc', [], 'unix', ['unix.link', 'unix.link.dll']) toolset.inherit_flags('gcc', 'unix') toolset.inherit_rules('gcc', 'unix') generators.override('gcc.prebuilt', 'builtin.prebuilt') generators.override('gcc.searched-lib-generator', 'searched-lib-generator') # Target naming is determined by types/lib.jam and the settings below this # comment. # # On *nix: # libxxx.a static library # libxxx.so shared library # # On windows (mingw): # libxxx.lib static library # xxx.dll DLL # xxx.lib import library # # On windows (cygwin) i.e. <target-os>cygwin
elif '<link>shared' in properties: actual_type = 'SHARED_LIB' else: actual_type = 'STATIC_LIB' prop_set = prop_set.add_raw(['<main-target-type>LIB']) # Construct the target. return generators.construct(project, name, actual_type, prop_set, sources) def viable_source_types(self): return ['*'] generators.register(LibGenerator("builtin.lib-generator")) generators.override("builtin.prebuilt", "builtin.lib-generator") def lib(names, sources=[], requirements=[], default_build=[], usage_requirements=[]): """The implementation of the 'lib' rule. Beyond standard syntax that rule allows simplified: 'lib a b c ;'.""" if len(names) > 1: if any(r.startswith('<name>') for r in requirements): get_manager().errors()("When several names are given to the 'lib' rule\n" + "it is not allowed to specify the <name> feature.") if sources: get_manager().errors()("When several names are given to the 'lib' rule\n" + "it is not allowed to specify sources.") project = get_manager().projects().current()
def debug(): global __debug if __debug is None: __debug = "--debug-configuration" in bjam.variable("ARGV") return __debug feature.extend('toolset', ['gcc']) toolset.inherit_generators('gcc', [], 'unix', ['unix.link', 'unix.link.dll']) toolset.inherit_flags('gcc', 'unix') toolset.inherit_rules('gcc', 'unix') generators.override('gcc.prebuilt', 'builtin.prebuilt') generators.override('gcc.searched-lib-generator', 'searched-lib-generator') # Target naming is determined by types/lib.jam and the settings below this # comment. # # On *nix: # libxxx.a static library # libxxx.so shared library # # On windows (mingw): # libxxx.lib static library # xxx.dll DLL # xxx.lib import library # # On windows (cygwin) i.e. <target-os>cygwin