# Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from b2.build import type as type_ from b2.manager import get_manager from b2.tools.cast import cast from b2.util import bjam_signature MANAGER = get_manager() PROJECT_REGISTRY = MANAGER.projects() # maps project.name() + type to type _project_types = {} type_.register_type('ASM', ['s', 'S', 'asm']) @bjam_signature((['type_'], ['sources', '*'], ['name', '?'])) def set_asm_type(type_, sources, name=''): project = PROJECT_REGISTRY.current() _project_types[project.name() + type_] = _project_types.get( project.name() + type_, type_) + '_' name = name if name else _project_types[project.name() + type_] type_ += '.asm' cast(name, type_.upper(), sources, [], [], []) PROJECT_REGISTRY.add_rule("set-asm-type", set_asm_type)
def register (): type.register_type ('EXE', ['exe'], None, ['NT', 'CYGWIN']) type.register_type ('EXE', [], None, [])
def register (): type.register_type ('MARKDOWN', ['markdown', 'md'])
def register (): type.register_type('PREPROCESSED_C', ['i'], 'C') type.register_type('PREPROCESSED_CPP', ['ii'], 'CPP')
def register (): type.register_type ('HTML', ['html'])
def register(): type.register_type('EXE', ['exe'], None, ['NT', 'CYGWIN']) type.register_type('EXE', [], None, [])
def register(): type.register_type('CPP', ['cpp', 'cxx', 'cc'])
# # Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from b2.build import type as type_ from b2.manager import get_manager from b2.tools.cast import cast from b2.util import bjam_signature MANAGER = get_manager() PROJECT_REGISTRY = MANAGER.projects() # maps project.name() + type to type _project_types = {} type_.register_type('ASM', ['s', 'S', 'asm']) @bjam_signature((['type_'], ['sources', '*'], ['name', '?'])) def set_asm_type(type_, sources, name=''): project = PROJECT_REGISTRY.current() _project_types[project.name() + type_] = _project_types.get( project.name() + type_, type_) + '_' name = name if name else _project_types[project.name() + type_] type_ += '.asm' cast(name, type_.upper(), sources, [], [], []) PROJECT_REGISTRY.add_rule("set-asm-type", set_asm_type)
includes = angles + quoted bjam.call("INCLUDES", target, includes) bjam.call("NOCARE", includes) ENGINE.set_target_variable(angles, "SEARCH", self.includes) ENGINE.set_target_variable(quoted, "SEARCH", [b] + self.includes) # Just propagate the current scanner to includes, in hope that includes # do not change scanners. SCANNERS.propagate(self, includes) bjam.call("ISFILE", includes) scanner.register(CScanner, "include") type_.register_type("CPP", ["cpp", "cxx", "cc"]) type_.register_type("H", ["h"]) type_.register_type("HPP", ["hpp"], "H") type_.register_type("C", ["c"]) # It most cases where a CPP file or a H file is a source of some action, we # should rebuild the result if any of files included by CPP/H are changed. One # case when this is not needed is installation, which is handled specifically. type_.set_scanner("CPP", CScanner) type_.set_scanner("C", CScanner) # One case where scanning of H/HPP files is necessary is PCH generation -- if # any header included by HPP being precompiled changes, we need to recompile the # header. type_.set_scanner("H", CScanner) type_.set_scanner("HPP", CScanner)
def register(): type.register_type('ASM', ['s', 'S', 'asm'])
def register(): type.register_type('PREPROCESSED_C', ['i'], 'C') type.register_type('PREPROCESSED_CPP', ['ii'], 'CPP')
def register (): if not type.registered ('LIB'): type.register ('LIB') type.register_type ('STATIC_LIB', ['lib', 'a'], 'LIB', ['NT', 'CYGWIN']) type.register_type ('STATIC_LIB', ['a'], 'LIB') type.register_type ('IMPORT_LIB', [], 'STATIC_LIB') type.set_generated_target_suffix ('IMPORT_LIB', [], 'lib') type.register_type ('SHARED_LIB', ['dll'], 'LIB', ['NT', 'CYGWIN']) type.register_type ('SHARED_LIB', ['so'], 'LIB') type.register_type ('SEARCHED_LIB', [], 'LIB')
def register(): type.register_type('RSP', ['rsp'])
def register(): type.register_type("OBJ", ["obj"], None, ["NT", "CYGWIN"]) type.register_type("OBJ", ["o"])
def register(): type.register_type("PREPROCESSED_C", ["i"], "C") type.register_type("PREPROCESSED_CPP", ["ii"], "CPP")
def register(): type.register_type('HTML', ['html'])
def register (): type.register_type ('CPP', ['cpp', 'cxx', 'cc'])
def register(): type.register_type('OBJ', ['obj'], None, ['NT', 'CYGWIN']) type.register_type('OBJ', ['o'])
def register (): type.register_type ('RSP', ['rsp'])
def register(): if not type.registered('LIB'): type.register('LIB') type.register_type('STATIC_LIB', ['lib', 'a'], 'LIB', ['NT', 'CYGWIN']) type.register_type('STATIC_LIB', ['a'], 'LIB') type.register_type('IMPORT_LIB', [], 'STATIC_LIB') type.set_generated_target_suffix('IMPORT_LIB', [], 'lib') type.register_type('SHARED_LIB', ['dll'], 'LIB', ['NT', 'CYGWIN']) type.register_type('SHARED_LIB', ['so'], 'LIB') type.register_type('SEARCHED_LIB', [], 'LIB')
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from b2.build import type as type_ type_.register_type('CPP', ['cpp', 'cxx', 'cc']) type_.register_type('H', ['h']) type_.register_type('HPP', ['hpp'], 'H') type_.register_type('C', ['c'])
def register(): type.register_type('MARKDOWN', ['markdown', 'md'])
includes = angles + quoted bjam.call('INCLUDES', target, includes) bjam.call('NOCARE', includes) ENGINE.set_target_variable(angles, 'SEARCH', self.includes) ENGINE.set_target_variable(quoted, 'SEARCH', [b] + self.includes) # Just propagate the current scanner to includes, in hope that includes # do not change scanners. SCANNERS.propagate(self, includes) bjam.call('ISFILE', includes) scanner.register(CScanner, 'include') type_.register_type('CPP', ['cpp', 'cxx', 'cc']) type_.register_type('H', ['h']) type_.register_type('HPP', ['hpp'], 'H') type_.register_type('C', ['c']) # It most cases where a CPP file or a H file is a source of some action, we # should rebuild the result if any of files included by CPP/H are changed. One # case when this is not needed is installation, which is handled specifically. type_.set_scanner('CPP', CScanner) type_.set_scanner('C', CScanner) # One case where scanning of H/HPP files is necessary is PCH generation -- if # any header included by HPP being precompiled changes, we need to recompile the # header. type_.set_scanner('H', CScanner) type_.set_scanner('HPP', CScanner)
def register (): type.register_type ('OBJ', ['obj'], None, ['NT', 'CYGWIN']) type.register_type ('OBJ', ['o'])