2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Make 'mark-target-as-explicit' accept multiple target names.

[SVN r64689]
This commit is contained in:
Vladimir Prus
2010-08-09 08:35:02 +00:00
parent 8ae8c29375
commit a273e0d03e
4 changed files with 9 additions and 13 deletions

View File

@@ -1016,14 +1016,10 @@ attribute is allowed only for top-level 'project' invocations""")
attributes.set("projects-to-build", now + dir, exact=True)
def explicit(self, target_names):
t = self.registry.current()
for n in target_names:
t.mark_target_as_explicit(n)
self.registry.current().mark_targets_as_explicit(target_names)
def always(self, target_names):
p = self.registry.current()
for n in target_names:
p.mark_target_as_always(n)
self.registry.current().mark_targets_as_alays(target_names)
def glob(self, wildcards, excludes=None):
return self.registry.glob_internal(self.registry.current(),

View File

@@ -297,14 +297,14 @@ class project-target : abstract-target
# Add 'target' to the list of targets in this project that should be build
# only by explicit request
#
rule mark-target-as-explicit ( target-name )
rule mark-target-as-explicit ( target-name * )
{
# Record the name of the target, not instance, since this rule is called
# before main target instances are created.
self.explicit-targets += $(target-name) ;
}
rule mark-target-as-always ( target-name )
rule mark-target-as-always ( target-name * )
{
# Record the name of the target, not instance, since this rule is called
# before main target instances are created.

View File

@@ -131,7 +131,7 @@ class TargetRegistry:
# Inline targets are not built by default.
p = t.project()
p.mark_target_as_explicit(name)
p.mark_targets_as_explicit([name])
result.append(name)
else:
@@ -441,7 +441,7 @@ class ProjectTarget (AbstractTarget):
return result
def mark_target_as_explicit (self, target_name):
def mark_targets_as_explicit (self, target_names):
"""Add 'target' to the list of targets in this project
that should be build only by explicit request."""
@@ -449,7 +449,7 @@ class ProjectTarget (AbstractTarget):
# rule is called before main target instaces are created.
self.explicit_targets_.add(target_name)
def mark_target_as_always(self, target_name):
def mark_targets_as_always(self, target_names):
self.always_targets_.add(target_name)
def add_alternative (self, target_instance):

View File

@@ -130,7 +130,7 @@ def install(name, package_name=None, requirements=[], binaries=[], libraries=[],
pt = get_manager().projects().current()
for subname in ["bin", "lib", "headers", "lib-shared", "lib-static", "lib-shared-universe", "lib-shared-cygwin"]:
pt.mark_target_as_explicit(name + "-" + subname)
pt.mark_targets_as_explicit([name + "-" + subname])
@bjam_signature((["target_name"], ["package_name"], ["data", "*"], ["requirements", "*"]))
def install_data(target_name, package_name, data, requirements):
@@ -148,7 +148,7 @@ def install_data(target_name, package_name, data, requirements):
stage.install(target_name, data,
requirements + ["<location>" + os.path.join(datadir, package_name)])
get_manager().projects().current().mark_target_as_explicit(target_name)
get_manager().projects().current().mark_targets_as_explicit([target_name])
def get_prefix(package_name, requirements):