]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/message.py
2 # Base revision: 64488.
4 # Copyright 2008, 2010 Vladimir Prus
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 # Defines main target type 'message', that prints a message when built for the
11 import b2
.build
.targets
as targets
12 import b2
.build
.property_set
as property_set
14 from b2
.manager
import get_manager
16 class MessageTargetClass(targets
.BasicTarget
):
18 def __init__(self
, name
, project
, sources
, requirements
, default_build
,
19 usage_requirements
, *args
):
20 targets
.BasicTarget
.__init
__(
21 self
, name
, project
, sources
, requirements
, default_build
, usage_requirements
)
25 def construct(self
, name
, sources
, ps
):
29 if type(arg
) == type([]):
34 return (property_set
.empty(), [])
36 def message(name
, *args
):
38 if type(name
) == type([]):
41 t
= get_manager().targets()
42 project
= get_manager().projects().current()
44 return t
.main_target_alternative(
47 t
.main_target_sources([], name
),
48 t
.main_target_requirements([], project
),
49 t
.main_target_default_build([], project
),
50 t
.main_target_usage_requirements([], project
),
54 get_manager().projects().add_rule("message", message
)