aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-06-02 08:32:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-06-02 08:32:40 +0200
commitb053edfa9bb29842d80931f02570f35f1896b75c (patch)
tree55ab75e346d9e8fba737784d866c8615941eb748 /libbuild2
parent048bcc1604a7e8aca666e219c0fdc3cd5517029e (diff)
Temporarily turn null include error into warning for backwards compat
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/target.cxx30
1 files changed, 19 insertions, 11 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx
index 4634688..19edad7 100644
--- a/libbuild2/target.cxx
+++ b/libbuild2/target.cxx
@@ -572,18 +572,26 @@ namespace build2
if (l.defined ())
{
if (l->null)
- fail << "null " << *ctx.var_include << " variable value specified "
- << "for prerequisite " << p;
-
- const string& v (cast<string> (*l));
-
- if (v == "false") r = include_type::excluded;
- else if (v == "true") r = include_type::normal;
- else if (v == "adhoc") r = include_type::adhoc;
- else if (v == "posthoc") r = include_type::posthoc;
+ {
+ // @@ TMP (added in 0.16.0).
+ //
+ warn << "null " << *ctx.var_include << " variable value specified "
+ << "for prerequisite " << p <<
+ info << "treated as undefined for backwards compatibility" <<
+ info << "this warning will become error in the future";
+ }
else
- fail << "invalid " << *ctx.var_include << " variable value '"
- << v << "' specified for prerequisite " << p;
+ {
+ const string& v (cast<string> (*l));
+
+ if (v == "false") r = include_type::excluded;
+ else if (v == "true") r = include_type::normal;
+ else if (v == "adhoc") r = include_type::adhoc;
+ else if (v == "posthoc") r = include_type::posthoc;
+ else
+ fail << "invalid " << *ctx.var_include << " variable value '"
+ << v << "' specified for prerequisite " << p;
+ }
}
}