From 2f0e450ae83032fbca47f73fc874d071d2410207 Mon Sep 17 00:00:00 2001
From: Wouter van Oortmerssen <wvo@google.com>
Date: Wed, 25 Nov 2015 17:26:34 -0800
Subject: [PATCH] Added long form options for all generators (--cpp etc.)

Short-form versions are still supported, but are deprecated.

Change-Id: I15f70ca8d69ba5790368205caa9603b65e1b7fff
Tested: on Linux.
---
 md__compiler.html | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/md__compiler.html b/md__compiler.html
index 2fe560da..ff3f7fe2 100644
--- a/md__compiler.html
+++ b/md__compiler.html
@@ -61,18 +61,28 @@ $(document).ready(function(){initNavTree('md__compiler.html','');});
 <div class="title">Using the schema compiler </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><p>Usage: </p><pre class="fragment">flatc [ -c ] [ -j ] [ -b ] [ -t ] [ -o PATH ] [ -I PATH ] [ -S ] FILES...
+<div class="textblock"><p>Usage: </p><pre class="fragment">flatc [ GENERATOR OPTIONS ] [ -o PATH ] [ -I PATH ] [ -S ] FILES...
       [ -- FILES...]
 </pre><p>The files are read and parsed in order, and can contain either schemas or data (see below). Later files can make use of definitions in earlier files.</p>
 <p><code>--</code> indicates that the following files are binary files in FlatBuffer format conforming to the schema(s) indicated before it. Incompatible binary files currently will give unpredictable results (!)</p>
 <p>Depending on the flags passed, additional files may be generated for each file processed:</p>
+<p>For any schema input files, one or more generators can be specified:</p>
+<ul>
+<li><code>--cpp</code>, <code>-c</code> : Generate a C++ header for all definitions in this file (as <code>filename_generated.h</code>).</li>
+<li><code>--java</code>, <code>-j</code> : Generate Java code.</li>
+<li><code>--csharp</code>, <code>-n</code> : Generate C# code.</li>
+<li><code>--go</code>, <code>-g</code> : Generate Go code.</li>
+<li><code>--python</code>, <code>-p</code>: Generate Python code.</li>
+<li><code>--javascript</code>, <code>-s</code>: Generate JavaScript code.</li>
+<li><code>--php</code>: Generate PHP code.</li>
+</ul>
+<p>For any data input files:</p>
+<ul>
+<li><code>--binary</code>, <code>-b</code> : If data is contained in this file, generate a <code>filename.bin</code> containing the binary flatbuffer (or a different extension if one is specified in the schema).</li>
+<li><code>--json</code>, <code>-t</code> : If data is contained in this file, generate a <code>filename.json</code> representing the data in the flatbuffer.</li>
+</ul>
+<p>Additional options:</p>
 <ul>
-<li><code>-c</code> : Generate a C++ header for all definitions in this file (as <code>filename_generated.h</code>). Skipped for data.</li>
-<li><code>-j</code> : Generate Java classes. Skipped for data.</li>
-<li><code>-n</code> : Generate C# classes. Skipped for data.</li>
-<li><code>-g</code> : Generate Go classes. Skipped for data.</li>
-<li><code>-b</code> : If data is contained in this file, generate a <code>filename.bin</code> containing the binary flatbuffer.</li>
-<li><code>-t</code> : If data is contained in this file, generate a <code>filename.json</code> representing the data in the flatbuffer.</li>
 <li><code>-o PATH</code> : Output all generated files to PATH (either absolute, or relative to the current directory). If omitted, PATH will be the current directory. PATH should end in your systems path separator, e.g. <code>/</code> or <code>\</code>.</li>
 <li><code>-I PATH</code> : when encountering <code>include</code> statements, attempt to load the files from this path. Paths will be tried in the order given, and if all fail (or none are specified) it will try to load relative to the path of the schema file being parsed.</li>
 <li><code>-M</code> : Print make rules for generated files.</li>
@@ -86,8 +96,9 @@ $(document).ready(function(){initNavTree('md__compiler.html','');});
 <li><code>--gen-onefile</code> : Generate single output file (useful for C#)</li>
 <li><code>--raw-binary</code> : Allow binaries without a file_indentifier to be read. This may crash flatc given a mismatched schema.</li>
 <li><code>--proto</code>: Expect input files to be .proto files (protocol buffers). Output the corresponding .fbs file. Currently supports: <code>package</code>, <code>message</code>, <code>enum</code>, nested declarations, <code>import</code> (use <code>-I</code> for paths), <code>extend</code>, <code>oneof</code>, <code>group</code>. Does not support, but will skip without error: <code>option</code>, <code>service</code>, <code>extensions</code>, and most everything else.</li>
-<li><code>--schema</code>: Serialize schemas instead of JSON (use with -b). This will output a binary version of the specified schema that itself corresponds to the reflection/reflection.fbs schema. Loading this binary file is the basis for reflection functionality. </li>
+<li><code>--schema</code>: Serialize schemas instead of JSON (use with -b). This will output a binary version of the specified schema that itself corresponds to the reflection/reflection.fbs schema. Loading this binary file is the basis for reflection functionality.</li>
 </ul>
+<p>NOTE: short-form options for generators are deprecated, use the long form whenever possible. </p>
 </div></div><!-- contents -->
 </div><!-- doc-content -->
 <!-- Google Analytics -->
-- 
GitLab