From b053edfa9bb29842d80931f02570f35f1896b75c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 2 Jun 2023 08:32:40 +0200 Subject: Temporarily turn null include error into warning for backwards compat --- libbuild2/target.cxx | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'libbuild2') 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 (*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 (*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; + } } } -- cgit v1.1