From 89120cf7addb304c1d1b029f1edae108e94ba023 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 Apr 2013 13:53:51 +0200 Subject: Make --changelog{,-in,-out,-dir} per-database --- odb/generator.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'odb/generator.cxx') 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; -- cgit v1.1