aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-18 08:48:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-10 18:46:43 +0200
commit1112388f458cbbac8a73ca840f7f62f6f517e9fa (patch)
treefca1d83380a250bcf1a0785277a1186bc0e2522b
parentcf75fa3e2be8c1fa12905e391a61c1ec763a5331 (diff)
Add --changelog-file-suffix and --changelog-suffix options
-rw-r--r--odb/option-functions.cxx3
-rw-r--r--odb/options.cli16
2 files changed, 19 insertions, 0 deletions
diff --git a/odb/option-functions.cxx b/odb/option-functions.cxx
index 5fe4b50..016b729 100644
--- a/odb/option-functions.cxx
+++ b/odb/option-functions.cxx
@@ -69,6 +69,7 @@ process_options (options& o)
o.odb_file_suffix ().insert (make_pair (cm, string ("-odb")));
o.sql_file_suffix ().insert (make_pair (cm, string ("")));
o.schema_file_suffix ().insert (make_pair (cm, string ("-schema")));
+ o.changelog_file_suffix ().insert (make_pair (cm, string ("")));
}
if (o.multi_database () == multi_database::disabled)
@@ -76,12 +77,14 @@ process_options (options& o)
o.odb_file_suffix ().insert (make_pair (db, string ("-odb")));
o.sql_file_suffix ().insert (make_pair (db, string ("")));
o.schema_file_suffix ().insert (make_pair (db, string ("-schema")));
+ o.changelog_file_suffix ().insert (make_pair (db, string ("")));
}
else
{
o.odb_file_suffix ().insert (make_pair (db, "-odb-" + db.string ()));
o.sql_file_suffix ().insert (make_pair (db, "-" + db.string ()));
o.schema_file_suffix ().insert (make_pair (db, "-schema-" + db.string ()));
+ o.changelog_file_suffix ().insert (make_pair (db, "-" + db.string ()));
}
// Set default --default-database value.
diff --git a/odb/options.cli b/odb/options.cli
index ecc6ef8..45d2305 100644
--- a/odb/options.cli
+++ b/odb/options.cli
@@ -312,6 +312,15 @@ class options
option for details."
};
+ database_map<std::string> --changelog-file-suffix
+ {
+ "<sfx>",
+ "Use <sfx> to construct the name of the changelog file. In the
+ single-database mode by default no suffix is used. In the
+ multi-database mode the default value for this option is
+ \c{\b{-}\i{db}} (where \ci{db} is the database name)."
+ };
+
std::string --hxx-suffix = ".hxx"
{
"<suffix>",
@@ -340,6 +349,13 @@ class options
the generated database schema file."
};
+ std::string --changelog-suffix = ".xml"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{.xml} to construct the name of
+ the changelog file."
+ };
+
// Prologues.
//
database_map<std::vector<std::string> > --hxx-prologue