aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-22 14:39:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-10 18:46:44 +0200
commit7cc50b230deb58703cd2d4df77fadcbb83fb14b3 (patch)
treefdae7f6397993c0a8b550db47fc9059a4360668c
parent289c09c718c00b364cc2cb156ac1f8b402e4d2d3 (diff)
Rename --output-name to --input-name
-rw-r--r--NEWS3
-rw-r--r--doc/manual.xhtml9
-rw-r--r--odb/generator.cxx4
-rw-r--r--odb/odb.cxx6
-rw-r--r--odb/options.cli12
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:</p>
<pre class="terminal">
-odb ... --generate-schema-only --at-once --output-name schema \
+odb ... --generate-schema-only --at-once --input-name company \
position.hxx employee.hxx
</pre>
- <p>The result of the above command is a single <code>schema.sql</code>
- file that contains the database creation code for both
- <code>position</code> and <code>employee</code> classes.</p>
+ <p>The result of the above command is a single <code>company.sql</code>
+ file (the name is derived from the <code>--input-name</code> value)
+ that contains the database creation code for both <code>position</code>
+ and <code>employee</code> classes.</p>
<h2><a name="6.4">6.4 Lazy Pointers</a></h2>
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 <dir> instead of the current directory."
};
- std::string --output-name
+ std::string --input-name
{
"<name>",
- "Use <name> instead of the input file to construct the names of the
- generated files."
+ "Use <name> 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 <name> 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 <file> 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}