diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-23 08:38:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-25 08:05:43 +0200 |
commit | cb7168f9a7db37b5c733ed4ccb15e00037420388 (patch) | |
tree | c6ed62e137a9fd60198b76dfb1a8f039b7ed2067 | |
parent | 2d9579da2144b2a8d67ea1d05fde96ec9d365944 (diff) |
Fix module separating blank line logic
-rw-r--r-- | build2/config/operation.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/build2/config/operation.cxx b/build2/config/operation.cxx index 617e74c..6a83273 100644 --- a/build2/config/operation.cxx +++ b/build2/config/operation.cxx @@ -101,10 +101,7 @@ namespace build2 const string& sname (i->first); const saved_variables& svars (i->second); - // Separate modules with a blank line. - // - ofs << endl; - + bool first (true); // Separate modules with a blank line. for (const saved_variable& sv: svars) { const variable& var (sv.var); @@ -219,6 +216,15 @@ namespace build2 continue; } + // If we got here then we are saving this variable. Handle the + // blank line. + // + if (first) + { + ofs << endl; + first = false; + } + // Handle the save_commented flag. // if ((org.first.defined () && org.first->extra) && // Default value. |