From a14daf38475a414e462708d9b0f4d651e5119b58 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Nov 2018 11:03:37 +0200 Subject: Add support for target and prerequisite specific variable blocks For example, now instead of: lib{foo}: cxx.loptions += -static lib{foo}: cxx.libs += -lpthread We can write: lib{foo}: { cxx.loptions += -static cxx.libs += -lpthread } The same works for prerequisites as well as target type/patterns. For example: exe{*.test}: { test = true install = false } --- build2/parser.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'build2/parser.hxx') diff --git a/build2/parser.hxx b/build2/parser.hxx index 582f925..e877422 100644 --- a/build2/parser.hxx +++ b/build2/parser.hxx @@ -76,6 +76,9 @@ namespace build2 parse_clause (token&, token_type&, bool one = false); void + parse_variable_block (token&, token_type&, const target_type*, string); + + void parse_dependency (token&, token_type&, names&&, const location&, names&&, const location&); @@ -122,6 +125,11 @@ namespace build2 void parse_variable (token&, token_type&, const variable&, token_type); + void + parse_type_pattern_variable (token&, token_type&, + const target_type&, string, + const variable&, token_type, const location&); + const variable& parse_variable_name (names&&, const location&); -- cgit v1.1