diff options
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 53f808c..64652d7 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -7569,7 +7569,9 @@ namespace build2 // and look for some wildcards since the pattern can be the result of an // expansion (or, worse, concatenation). Thus pattern_mode::detect: we // are going to ask parse_names() to detect for us if the first name is - // a pattern. And if it is, to refrain from adding pair/dir/type. + // a pattern. And if it is, to refrain from adding pair/dir/type (note: + // for the pattern inclusions and exclusions the name's type member will + // be set to "+" and "-", respectively). // optional<const target_type*> pat_tt ( parse_names ( @@ -8313,11 +8315,22 @@ namespace build2 fail (loc) << "invalid path '" << e.path << "'"; } + // Note that for a pattern inclusion group (see above) we make sure + // that the resulting patterns are simple names, passing NULL as the + // directory path (see the parse_names_trailer::parse() lambda + // implementation for details). + // count = parse_names_trailer ( - t, tt, ns, pmode, what, separators, pairn, *pp1, dp1, tp1, cross); - - // If empty group or empty name, then this is not a pattern inclusion - // group (see above). + t, tt, + ns, + pmode, + what, + separators, pairn, + *pp1, (!pinc ? dp1 : nullptr), tp1, + cross); + + // If empty group or empty name, then this is not a pattern + // inclusion group. // if (pinc) { |