aboutsummaryrefslogtreecommitdiff
path: root/build2/target-type.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-08-07 14:59:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-08-07 19:32:10 +0200
commitc2b4305349ca855c497904282db354de56c74842 (patch)
tree13ff2901d1ab491d930f81cee6fa49e5cff11577 /build2/target-type.hxx
parent7149c8eaeec3efcfc9da0f89c9ae979ff2c07fd5 (diff)
Add support for default extension specification, trailing dot escaping
For example: cxx{*}: extension = cxx cxx{foo} # foo.cxx cxx{foo.test} # foo.test (probably what we want...) cxx{foo.test...} # foo.test.cxx (... is this) cxx{foo..} # foo. cxx{foo....} # foo.. cxx{foo.....} # error (must come in escape pair)
Diffstat (limited to 'build2/target-type.hxx')
-rw-r--r--build2/target-type.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/build2/target-type.hxx b/build2/target-type.hxx
index 408a520..37e511d 100644
--- a/build2/target-type.hxx
+++ b/build2/target-type.hxx
@@ -45,7 +45,9 @@ namespace build2
//
// If the pattern function is not NULL, then it is used to amend a pattern
// or match (reverse is false) and then, if the amendment call returned
- // true, to reverse it in the resulting matches.
+ // true, to reverse it in the resulting matches. The pattern function for a
+ // non-directory target must first call target::split_name() if reverse is
+ // false.
//
struct target_type
{
@@ -60,7 +62,12 @@ namespace build2
const char*,
bool search);
- bool (*pattern) (const target_type&, const scope&, string&, bool reverse);
+ bool (*pattern) (const target_type&,
+ const scope&,
+ string& name,
+ optional<string>& extension,
+ const location&,
+ bool reverse);
void (*print) (ostream&, const target_key&);