aboutsummaryrefslogtreecommitdiff
path: root/build/dist
diff options
context:
space:
mode:
Diffstat (limited to 'build/dist')
-rw-r--r--build/dist/module.cxx2
-rw-r--r--build/dist/operation.cxx18
-rw-r--r--build/dist/rule.cxx4
3 files changed, 19 insertions, 5 deletions
diff --git a/build/dist/module.cxx b/build/dist/module.cxx
index 0b60fa8..9bd058a 100644
--- a/build/dist/module.cxx
+++ b/build/dist/module.cxx
@@ -58,6 +58,8 @@ namespace build
//
if (first)
{
+ variable_pool.find ("dist", bool_type);
+
variable_pool.find ("dist.package", string_type);
variable_pool.find ("dist.root", dir_path_type);
diff --git a/build/dist/operation.cxx b/build/dist/operation.cxx
index 0fb3aef..2a84894 100644
--- a/build/dist/operation.cxx
+++ b/build/dist/operation.cxx
@@ -199,6 +199,7 @@ namespace build
// entered.
//
action_targets files;
+ const variable& dist_var (variable_pool.find ("dist"));
for (const auto& pt: targets)
{
@@ -211,7 +212,13 @@ namespace build
{
// Include unless explicitly excluded.
//
- files.push_back (ft);
+ auto l ((*ft)[dist_var]);
+
+ if (l && !as<bool> (*l))
+ level5 ([&]{trace << "excluding " << *ft;});
+ else
+ files.push_back (ft);
+
continue;
}
@@ -219,7 +226,14 @@ namespace build
{
// Exclude unless explicitly included.
//
- //files.push_back (*ft);
+ auto l ((*ft)[dist_var]);
+
+ if (l && as<bool> (*l))
+ {
+ level5 ([&]{trace << "including " << *ft;});
+ files.push_back (ft);
+ }
+
continue;
}
}
diff --git a/build/dist/rule.cxx b/build/dist/rule.cxx
index 6977676..b5e1185 100644
--- a/build/dist/rule.cxx
+++ b/build/dist/rule.cxx
@@ -33,11 +33,9 @@ namespace build
if (p.proj () != nullptr)
continue;
- // @@ This is where we will handle dist/nodist.
-
target& pt (p.search ());
- // Don't match targets that are outside our project.
+ // Don't match targets that are outside of our project.
//
if (pt.dir.sub (out_root))
build::match (a, pt);