From 7cc50b230deb58703cd2d4df77fadcbb83fb14b3 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
Date: Fri, 22 Mar 2013 14:39:02 +0200
Subject: Rename --output-name to --input-name
---
NEWS | 3 +++
doc/manual.xhtml | 9 +++++----
odb/generator.cxx | 4 ++--
odb/odb.cxx | 6 +++---
odb/options.cli | 12 +++++++-----
5 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/NEWS b/NEWS
index a73d6b0..a7cad45 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ Version 2.3.0
thrown if SQLite forces a transaction to roll back. For more information,
refer to Section 16.5.6, "Forced Rollback".
+ * The --output-name option has been renamed to --input-name, which is more
+ semantically correct.
+
Version 2.2.0
* Multi-database support. This mechanism allows an application to
diff --git a/doc/manual.xhtml b/doc/manual.xhtml
index 151a1fd..52c4f02 100644
--- a/doc/manual.xhtml
+++ b/doc/manual.xhtml
@@ -6867,13 +6867,14 @@ odb ... --odb-epilogue "#include \"employee.hxx\"" position.hxx
options. For example:
-odb ... --generate-schema-only --at-once --output-name schema \
+odb ... --generate-schema-only --at-once --input-name company \
position.hxx employee.hxx
- The result of the above command is a single schema.sql
- file that contains the database creation code for both
- position
and employee
classes.
+ The result of the above command is a single company.sql
+ file (the name is derived from the --input-name
value)
+ that contains the database creation code for both position
+ and employee
classes.
diff --git a/odb/generator.cxx b/odb/generator.cxx
index dfc5ba6..616190b 100644
--- a/odb/generator.cxx
+++ b/odb/generator.cxx
@@ -119,9 +119,9 @@ generate (options const& ops,
//
fs::auto_removes auto_rm;
- path file (ops.output_name ().empty ()
+ path file (ops.input_name ().empty ()
? p.leaf ()
- : path (ops.output_name ()).leaf ());
+ : path (ops.input_name ()).leaf ());
string base (file.base ().string ());
string hxx_name (base + ops.odb_file_suffix ()[db] + ops.hxx_suffix ());
diff --git a/odb/odb.cxx b/odb/odb.cxx
index 74ef5a4..93927b8 100644
--- a/odb/odb.cxx
+++ b/odb/odb.cxx
@@ -753,9 +753,9 @@ main (int argc, char* argv[])
bool at_once (ops.at_once () && plugin_args.size () - end > 1);
if (at_once)
{
- if (ops.output_name ().empty ())
+ if (ops.input_name ().empty ())
{
- e << "error: --output-name required when compiling multiple " <<
+ e << "error: --input-name required when compiling multiple " <<
"input files at once (--at-once)" << endl;
return 1;
}
@@ -783,7 +783,7 @@ main (int argc, char* argv[])
//
for (; end < plugin_args.size (); ++end)
{
- string name (at_once ? ops.output_name () : plugin_args[end]);
+ string name (at_once ? ops.input_name () : plugin_args[end]);
// Set the --svc-file option.
//
diff --git a/odb/options.cli b/odb/options.cli
index fcacbd3..b086011 100644
--- a/odb/options.cli
+++ b/odb/options.cli
@@ -223,7 +223,7 @@ class options
"Generate code for all the input files as well as for all the files that
they include at once. The result is a single set of source/schema files
that contain all the generated code. If more than one input file is
- specified together with this option, then the \cb{--output-name} option
+ specified together with this option, then the \cb{--input-name} option
must also be specified in order to provide the base name for the output
files. In this case, the directory part of such a base name is used as
the location of the combined file. This can be important for the
@@ -276,11 +276,13 @@ class options
"Write the generated files to instead of the current directory."
};
- std::string --output-name
+ std::string --input-name
{
"",
- "Use instead of the input file to construct the names of the
- generated files."
+ "Use instead of the input file to derive the names of the
+ generated files. If the \cb{--at-once} option is specified, then
+ the directory part of is used as the location of the
+ combined file. Refer to the \cb{--at-once} option for details."
};
std::string --changelog
@@ -289,7 +291,7 @@ class options
"Read/write changelog from/to instead of the default changelog
file. The default changelog file name is derived from the input file
name and it is placed into the same directory as the input file. Note
- that the \cb{--output-name} option does not affect the changelog file
+ that the \cb{--output-dir} option does not affect the changelog file
location. In other words, by default, the changelog file is treated
as another input rather than output even though the ODB compiler may
modify it. Use the \cb{--changelog-in} and \cb{--changelog-out}
--
cgit v1.1