From 9d860f46631c1567c62336fcb25cf7b8090855a4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Dec 2021 11:16:22 +0200 Subject: Recognize absolute Windows paths in make parser --- libbuild2/cc/compile-rule.cxx | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'libbuild2/cc/compile-rule.cxx') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 44d1fd5..84151d4 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -4242,18 +4242,29 @@ namespace build2 // Fall through to the 'second' block. } - if (second) - { - // Skip the source file. - // - make_parser::next (l, pos, true /* prereq */); - second = false; - } - while (pos != l.size ()) { string f ( - make_parser::next (l, pos, true /* prereq */).first); + make_parser::next ( + l, pos, make_parser::type::prereq).first); + + if (pos != l.size () && l[pos] == ':') + { + // @@ Hm, the same as above. + // + text << l; + + bad_error = true; + break; + } + + // Skip the source file. + // + if (second) + { + second = false; + continue; + } // Skip until where we left off. // -- cgit v1.1