From c2b4305349ca855c497904282db354de56c74842 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Aug 2018 14:59:07 +0200 Subject: 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) --- build2/in/target.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/in/target.cxx') diff --git a/build2/in/target.cxx b/build2/in/target.cxx index fec1135..65281a1 100644 --- a/build2/in/target.cxx +++ b/build2/in/target.cxx @@ -34,9 +34,14 @@ namespace build2 } static bool - in_pattern (const target_type&, const scope&, string&, bool) + in_pattern (const target_type&, + const scope&, + string&, + optional&, + const location& l, + bool) { - fail << "pattern in in{} prerequisite" << endf; + fail (l) << "pattern in in{} prerequisite" << endf; } extern const char in_ext_def[] = ""; // No extension by default. -- cgit v1.1