aboutsummaryrefslogtreecommitdiff
path: root/build/install/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-16 13:22:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-16 13:22:01 +0200
commitad99a55b0bb615f20cec9880aeb96ab0779d56d0 (patch)
tree81a83b62e21410f1a3b47068509ce25a96513937 /build/install/rule.cxx
parent77a0988759f295893b0b0e171249661a2059b1e7 (diff)
Tweak install rule
One day we are going to get it right...
Diffstat (limited to 'build/install/rule.cxx')
-rw-r--r--build/install/rule.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/build/install/rule.cxx b/build/install/rule.cxx
index 854832c..fa648b5 100644
--- a/build/install/rule.cxx
+++ b/build/install/rule.cxx
@@ -89,12 +89,18 @@ namespace build
// First determine if this target should be installed (called
// "installable" for short).
//
- match_result mr (t, lookup (t, "install") != nullptr);
+ if (lookup (t, "install") == nullptr)
+ // If this is the update pre-operation, signal that we don't match so
+ // that some other rule can take care of it.
+ //
+ return a.operation () == update_id ? nullptr : match_result (t, false);
+
+ match_result mr (t, true);
// If this is the update pre-operation, change the recipe action
// to (update, 0) (i.e., "unconditional update").
//
- if (mr.bvalue && a.operation () == update_id)
+ if (a.operation () == update_id)
mr.recipe_action = action (a.meta_operation (), update_id);
return mr;
@@ -136,17 +142,18 @@ namespace build
if (p.proj () != nullptr)
continue;
- // @@ This is where we will handle [noinstall].
- //
-
// Let a customized rule have its say.
//
- // @@ This will be skipped if forced with [install]?
- //
target* pt (filter (a, t, p));
if (pt == nullptr)
continue;
+ // See if the user instructed us not to install it.
+ //
+ auto l ((*pt)["install"]);
+ if (l && as<dir_path> (*l).string () == "false")
+ continue;
+
build::match (a, *pt);
// If the matched rule returned noop_recipe, then the target