diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 13:53:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 13:53:51 +0200 |
commit | 89120cf7addb304c1d1b029f1edae108e94ba023 (patch) | |
tree | 574007f6b3691b8ae8ce504eb2f1a6a019456787 /odb/generator.cxx | |
parent | 377bfe7de7fd4305ea1ecc4ab1a361fa989a80d7 (diff) |
Make --changelog{,-in,-out,-dir} per-database
Diffstat (limited to 'odb/generator.cxx')
-rw-r--r-- | odb/generator.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx index a4e1303..3b50299 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -167,17 +167,19 @@ generate (options const& ops, string base (file.base ().string ()); path in_log_path; - path log_dir (ops.changelog_dir ().empty () ? "" : ops.changelog_dir ()); - if (ops.changelog_in_specified ()) + path log_dir (ops.changelog_dir ().count (db) != 0 + ? ops.changelog_dir ()[db] + : ""); + if (ops.changelog_in ().count (db) != 0) { - in_log_path = path (ops.changelog_in ()); + in_log_path = path (ops.changelog_in ()[db]); if (!log_dir.empty () && !in_log_path.absolute ()) in_log_path = log_dir / in_log_path; } - else if (ops.changelog_specified ()) + else if (ops.changelog ().count (db) != 0) { - in_log_path = path (ops.changelog ()); + in_log_path = path (ops.changelog ()[db]); if (!in_log_path.absolute () && !log_dir.empty ()) in_log_path = log_dir / in_log_path; @@ -202,9 +204,9 @@ generate (options const& ops, string old_changelog_xml; path out_log_path; - if (ops.changelog_out_specified ()) + if (ops.changelog_out ().count (db)) { - out_log_path = path (ops.changelog_out ()); + out_log_path = path (ops.changelog_out ()[db]); if (!log_dir.empty () && !out_log_path.absolute ()) out_log_path = log_dir / out_log_path; |