diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-09 14:12:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-10 08:01:33 +0200 |
commit | 2b1272f1c94ab1dbaf806af9c02ef866267ffed7 (patch) | |
tree | e7ad99fbb36367a0883eadaade94c41c9894fced /build2/lexer.hxx | |
parent | 1b0efce7791d4d61aa57038edb30fb823ed48e21 (diff) |
Generalize target/prerequisite var block, initial ad hoc target work
Target/prerequisite-specific variable blocks can now be present even if
there are prerequisites. For example, now instead of:
exe{foo}: cxx{foo}
exe{foo}: cc.loptions += ...
Or:
exe{foo}: cxx{foo}
exe{foo}:
{
cc.loptions += ...
cc.libs += ...
}
We can write:
exe{foo}: cxx{foo}
{
cc.loptions += ...
cc.libs += ...
}
This also works with dependency chains in which case the block applies
to the set of prerequisites (note: not targets) before the last ':'. For
example:
./: exe{foo}: libue{foo}: cxx{foo}
{
bin.whole = false # Applies to the libue{foo} prerequisite.
}
Diffstat (limited to 'build2/lexer.hxx')
-rw-r--r-- | build2/lexer.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/build2/lexer.hxx b/build2/lexer.hxx index 45d69d9..b71167a 100644 --- a/build2/lexer.hxx +++ b/build2/lexer.hxx @@ -23,7 +23,7 @@ namespace build2 // restrict certain character (e.g., '/') from appearing in the name. The // attribute mode is like value except it doesn't treat '{' and '}' as // special (so we cannot have name groups in attributes). The eval mode is - // used in the evaluation context. Quoted are internal modes and should not + // used in the evaluation context. Quoted modes are internal and should not // be set explicitly. // // Note that the normal, value, and eval modes split words separated by the @@ -124,9 +124,9 @@ namespace build2 lexer_mode mode; char sep_pair; - bool sep_space; // Are whitespaces separators (see skip_spaces())? - bool sep_newline; // Is newline special (see skip_spaces())? - bool quotes; // Recognize quoted fragments. + bool sep_space; // Are whitespaces separators (see skip_spaces())? + bool sep_newline; // Is newline special (see skip_spaces())? + bool quotes; // Recognize quoted fragments. const char* escapes; // Effective escape sequences to recognize. |