Beispiel #1
0
# 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)
Beispiel #2
0
def register ():
    type.register_type ('EXE', ['exe'], None, ['NT', 'CYGWIN'])
    type.register_type ('EXE', [], None, [])
Beispiel #3
0
def register ():
    type.register_type ('MARKDOWN', ['markdown', 'md'])
Beispiel #4
0
def register ():
    type.register_type('PREPROCESSED_C', ['i'], 'C')
    type.register_type('PREPROCESSED_CPP', ['ii'], 'CPP')
Beispiel #5
0
def register ():
    type.register_type ('HTML', ['html'])
Beispiel #6
0
def register():
    type.register_type('EXE', ['exe'], None, ['NT', 'CYGWIN'])
    type.register_type('EXE', [], None, [])
Beispiel #7
0
def register():
    type.register_type('CPP', ['cpp', 'cxx', 'cc'])
Beispiel #8
0
#
# 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)
Beispiel #9
0
        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)
Beispiel #10
0
def register():
    type.register_type('ASM', ['s', 'S', 'asm'])
Beispiel #11
0
def register():
    type.register_type('ASM', ['s', 'S', 'asm'])
Beispiel #12
0
def register():
    type.register_type('PREPROCESSED_C', ['i'], 'C')
    type.register_type('PREPROCESSED_CPP', ['ii'], 'CPP')
Beispiel #13
0
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')
Beispiel #14
0
def register():
    type.register_type('RSP', ['rsp'])
Beispiel #15
0
def register():
    type.register_type("OBJ", ["obj"], None, ["NT", "CYGWIN"])
    type.register_type("OBJ", ["o"])
Beispiel #16
0
def register():
    type.register_type("PREPROCESSED_C", ["i"], "C")
    type.register_type("PREPROCESSED_CPP", ["ii"], "CPP")
Beispiel #17
0
def register():
    type.register_type('HTML', ['html'])
Beispiel #18
0
def register ():
    type.register_type ('CPP', ['cpp', 'cxx', 'cc'])
Beispiel #19
0
def register():
    type.register_type('OBJ', ['obj'], None, ['NT', 'CYGWIN'])
    type.register_type('OBJ', ['o'])
Beispiel #20
0
def register ():
    type.register_type ('RSP', ['rsp'])
Beispiel #21
0
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')
Beispiel #22
0
# 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'])
Beispiel #23
0
def register():
    type.register_type('MARKDOWN', ['markdown', 'md'])
Beispiel #24
0
        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)
Beispiel #25
0
def register ():
    type.register_type ('OBJ', ['obj'], None, ['NT', 'CYGWIN'])
    type.register_type ('OBJ', ['o'])