]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/types/asm.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / src / tools / types / asm.py
1 # Copyright Craig Rodrigues 2005.
2 # Copyright (c) 2008 Steven Watanabe
3 #
4 # Distributed under the Boost
5 # Software License, Version 1.0. (See accompanying
6 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 from b2.build import type as type_
8 from b2.manager import get_manager
9 from b2.tools.cast import cast
10 from b2.util import bjam_signature
11
12
13 MANAGER = get_manager()
14 PROJECT_REGISTRY = MANAGER.projects()
15
16 # maps project.name() + type to type
17 _project_types = {}
18
19 type_.register_type('ASM', ['s', 'S', 'asm'])
20
21
22 @bjam_signature((['type_'], ['sources', '*'], ['name', '?']))
23 def set_asm_type(type_, sources, name=''):
24 project = PROJECT_REGISTRY.current()
25 _project_types[project.name() + type_] = _project_types.get(
26 project.name() + type_, type_) + '_'
27
28 name = name if name else _project_types[project.name() + type_]
29 type_ += '.asm'
30 return cast(name, type_.upper(), sources, [], [], [])
31
32
33 PROJECT_REGISTRY.add_rule("set-asm-type", set_asm_type)