diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-30 14:39:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-30 14:39:07 +0200 |
commit | d5e4d325c6a4acc8df6f0e42bc7d76e1f833d58a (patch) | |
tree | aea61f78825f2fd6ce22a4630f6d555b4a8714c1 /build/dist/operation.cxx | |
parent | b2374e3174e13682fcfa3ffe3fc62f2fd161a7cc (diff) |
Implement dist support for including/excluding targets
For example:
cxx{*-options}: dist = true
Diffstat (limited to 'build/dist/operation.cxx')
-rw-r--r-- | build/dist/operation.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
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; } } |