From 655121741560d62c1ae82c13a9d2aad18f130603 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Nov 2018 14:00:07 +0200 Subject: Implement support for dependency chains Now instead of: ./: exe{foo} exe{foo}: cxx{*} We can write: ./: exe{foo}: cxx{*} Or even: ./: exe{foo}: libue{foo}: cxx{*} This can be combined with prerequisite-specific variables (which naturally only apply to the last set of prerequisites in the chain): ./: exe{foo}: libue{foo}: bin.whole = false --- build2/parser.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/parser.hxx') diff --git a/build2/parser.hxx b/build2/parser.hxx index dfb4c6b..582f925 100644 --- a/build2/parser.hxx +++ b/build2/parser.hxx @@ -67,15 +67,20 @@ namespace build2 // If one is true then parse a single (logical) line (logical means it // can actually be several lines, e.g., an if-block). Return false if - // nothing has been parsed (i.e., we are on the same token). + // nothing has been parsed (i.e., we are still on the same token). // - // Note that after this function returns, the token is the first token on + // Note that after this function returns, the token is the first token of // the next line (or eos). // bool parse_clause (token&, token_type&, bool one = false); void + parse_dependency (token&, token_type&, + names&&, const location&, + names&&, const location&); + + void parse_assert (token&, token_type&); void -- cgit v1.1