diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-18 15:44:32 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:35:29 +0200 |
commit | 49c6210a1ae21b6722d513bd35ba90ee1fec3170 (patch) | |
tree | 217a90de6b38631844fe004e335aab0e44267d18 /libbuild2/script | |
parent | 5910fbb854d7aa957091aa48a248b2de239eb558 (diff) |
Integrate buildscript running into recipe default_action()
Diffstat (limited to 'libbuild2/script')
-rw-r--r-- | libbuild2/script/run.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/libbuild2/script/run.cxx b/libbuild2/script/run.cxx index 00330a5..a1cd733 100644 --- a/libbuild2/script/run.cxx +++ b/libbuild2/script/run.cxx @@ -439,34 +439,34 @@ namespace build2 // the program output doesn't match. // auto save_regex = [&op, &rl, &rd, &ll, &line] () -> path - { - path rp (op + ".regex"); + { + path rp (op + ".regex"); - // Encode here-document regex global flags if present as a file - // name suffix. For example if icase and idot flags are specified - // the name will look like: - // - // stdout.regex-di - // - if (rd.type == redirect_type::here_doc_regex && !rl.flags.empty ()) - rp += '-' + rl.flags; + // Encode here-document regex global flags if present as a file + // name suffix. For example if icase and idot flags are specified + // the name will look like: + // + // stdout.regex-di + // + if (rd.type == redirect_type::here_doc_regex && !rl.flags.empty ()) + rp += '-' + rl.flags; - // Note that if would be more efficient to directly write chunks - // to file rather than to compose a string first. Hower we don't - // bother (about performance) for the sake of the code as we - // already failed. - // - string s; - for (auto b (rl.lines.cbegin ()), i (b), e (rl.lines.cend ()); - i != e; ++i) - { - if (i != b) s += '\n'; - s += line (*i); - } + // Note that if would be more efficient to directly write chunks + // to file rather than to compose a string first. Hower we don't + // bother (about performance) for the sake of the code as we + // already failed. + // + string s; + for (auto b (rl.lines.cbegin ()), i (b), e (rl.lines.cend ()); + i != e; ++i) + { + if (i != b) s += '\n'; + s += line (*i); + } - save (rp, s, ll); - return rp; - }; + save (rp, s, ll); + return rp; + }; // Finally create regex line string. // |