diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-12-06 11:16:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-12-06 11:16:22 +0200 |
commit | 9d860f46631c1567c62336fcb25cf7b8090855a4 (patch) | |
tree | 4df23a20e36671246718fc55af6fa5074d791467 /libbuild2/cc/compile-rule.cxx | |
parent | 2006284bfbda3416eb8348078fd98fa518d25c47 (diff) |
Recognize absolute Windows paths in make parser
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 29 |
1 files changed, 20 insertions, 9 deletions
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. // |