]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/types/asm.py
1 # Copyright Craig Rodrigues 2005.
2 # Copyright (c) 2008 Steven Watanabe
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
13 MANAGER
= get_manager()
14 PROJECT_REGISTRY
= MANAGER
.projects()
16 # maps project.name() + type to type
19 type_
.register_type('ASM', ['s', 'S', 'asm'])
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_
) + '_'
28 name
= name
if name
else _project_types
[project
.name() + type_
]
30 return cast(name
, type_
.upper(), sources
, [], [], [])
33 PROJECT_REGISTRY
.add_rule("set-asm-type", set_asm_type
)