let ocamlc_spec = Some [
  "-a",
  false,
  " Build a library";

  "-absname",
  false,
  " Show absolute filenames in error messages";

  "-annot",
  false,
  " Save information in <filename>.annot";

  "-bin-annot",
  false,
  " Save typedtree in <filename>.cmt";

  "-c",
  false,
  " Compile only (do not link)";

  "-cc",
  true,
  "<command>  Use <command> as the C compiler and linker";

  "-cclib",
  true,
  "<opt>  Pass option <opt> to the C linker";

  "-ccopt",
  true,
  "<opt>  Pass option <opt> to the C compiler and linker";

  "-color",
  true,
  "{auto|always|never}  Enable or disable colors in compiler messages\n    The following settings are supported:\n      auto    use heuristics to enable colors only if supported\n      always  enable colors\n      never   disable colors\n    The default setting is 'auto', and the current heuristic\n    checks that the TERM environment variable exists and is\n    not empty or \"dumb\", and that isatty(stderr) holds.";

  "-compat-32",
  false,
  " Check that generated bytecode can run on 32-bit platforms";

  "-config",
  false,
  " Print configuration values and exit";

  "-custom",
  false,
  " Link in custom mode";

  "-dllib",
  true,
  "<lib>  Use the dynamically-loaded library <lib>";

  "-dllpath",
  true,
  "<dir>  Add <dir> to the run-time search path for shared libraries";

  "-dtypes",
  false,
  " (deprecated) same as -annot";

  "-for-pack",
  true,
  "<ident>  Generate code that can later be `packed' with\n     ocamlc -pack -o <ident>.cmo";

  "-g",
  false,
  " Save debugging information";

  "-i",
  false,
  " Print inferred interface";

  "-I",
  true,
  "<dir>  Add <dir> to the list of include directories";

  "-impl",
  true,
  "<file>  Compile <file> as a .ml file";

  "-intf",
  true,
  "<file>  Compile <file> as a .mli file";

  "-intf-suffix",
  true,
  "<string>  Suffix for interface files (default: .mli)";

  "-intf_suffix",
  true,
  "<string>  (deprecated) same as -intf-suffix";

  "-keep-docs",
  false,
  " Keep documentation strings in .cmi files";

  "-no-keep-docs",
  false,
  " Do not keep documentation strings in .cmi files (default)";

  "-keep-locs",
  false,
  " Keep locations in .cmi files";

  "-no-keep-locs",
  false,
  " Do not keep locations in .cmi files (default)";

  "-labels",
  false,
  " Use commuting label mode";

  "-linkall",
  false,
  " Link all modules, even unused ones";

  "-make-runtime",
  false,
  " Build a runtime system with given C objects and libraries";

  "-make_runtime",
  false,
  " (deprecated) same as -make-runtime";

  "-modern",
  false,
  " (deprecated) same as -labels";

  "-alias-deps",
  false,
  " Do record dependencies for module aliases";

  "-no-alias-deps",
  false,
  " Do not record dependencies for module aliases";

  "-app-funct",
  false,
  " Activate applicative functors";

  "-no-app-funct",
  false,
  " Deactivate applicative functors";

  "-no-check-prims",
  false,
  " Do not check runtime for primitives";

  "-noassert",
  false,
  " Do not compile assertion checks";

  "-noautolink",
  false,
  " Do not automatically link C libraries specified in .cma files";

  "-nolabels",
  false,
  " Ignore non-optional labels in types";

  "-nostdlib",
  false,
  " Do not add default directory to the list of include directories";

  "-o",
  true,
  "<file>  Set output file name to <file>";

  "-opaque",
  false,
  " Does not generate cross-module optimization information\n     (reduces necessary recompilation on module change)";

  "-open",
  true,
  "<module>  Opens the module <module> before typing";

  "-output-obj",
  false,
  " Output an object file instead of an executable";

  "-output-complete-obj",
  false,
  " Output an object file, including runtime, instead of an executable";

  "-pack",
  false,
  " Package the given .cmo files into one .cmo";

  "-pp",
  true,
  "<command>  Pipe sources through preprocessor <command>";

  "-ppx",
  true,
  "<command>  Pipe abstract syntax trees through preprocessor <command>";

  "-plugin",
  true,
  "<plugin>  Load dynamic plugin <plugin>";

  "-principal",
  false,
  " Check principality of type inference";

  "-no-principal",
  false,
  " Do not check principality of type inference (default)";

  "-rectypes",
  false,
  " Allow arbitrary recursive types";

  "-no-rectypes",
  false,
  " Do not allow arbitrary recursive types (default)";

  "-runtime-variant",
  true,
  "<str>  Use the <str> variant of the run-time system";

  "-safe-string",
  false,
  " Make strings immutable";

  "-short-paths",
  false,
  " Shorten paths in types";

  "-strict-sequence",
  false,
  " Left-hand part of a sequence must have type unit";

  "-no-strict-sequence",
  false,
  " Left-hand part of a sequence need not have type unit (default)";

  "-strict-formats",
  false,
  " Reject invalid formats accepted by legacy implementations\n     (Warning: Invalid formats may behave differently from\n      previous OCaml versions, and will become always-rejected\n      in future OCaml versions. You should always use this flag\n      to detect invalid formats so you can fix them.)";

  "-no-strict-formats",
  false,
  " Accept invalid formats accepted by legacy implementations (default)\n     (Warning: Invalid formats may behave differently from\n      previous OCaml versions, and will become always-rejected\n      in future OCaml versions. You should never use this flag\n      and instead fix invalid formats.)";

  "-thread",
  false,
  " Generate code that supports the system threads library";

  "-unboxed-types",
  false,
  " unannotated unboxable types will be unboxed";

  "-no-unboxed-types",
  false,
  " unannotated unboxable types will not be unboxed (default)";

  "-unsafe",
  false,
  " Do not compile bounds checking on array and string access";

  "-unsafe-string",
  false,
  " Make strings mutable (default)";

  "-use-runtime",
  true,
  "<file>  Generate bytecode for the given runtime system";

  "-use_runtime",
  true,
  "<file>  (deprecated) same as -use-runtime";

  "-v",
  false,
  " Print compiler version and location of standard library and exit";

  "-verbose",
  false,
  " Print calls to external commands";

  "-version",
  false,
  " Print version and exit";

  "--version",
  false,
  " Print version and exit";

  "-vmthread",
  false,
  " Generate code that supports the threads library with VM-level\n     scheduling";

  "-vnum",
  false,
  " Print version number and exit";

  "-w",
  true,
  "<list>  Enable or disable warnings according to <list>:\n        +<spec>   enable warnings in <spec>\n        -<spec>   disable warnings in <spec>\n        @<spec>   enable warnings in <spec> and treat them as errors\n     <spec> can be:\n        <num>             a single warning number\n        <num1>..<num2>    a range of consecutive warning numbers\n        <letter>          a predefined set\n     default setting is \"+a-4-6-7-9-27-29-32..39-41..42-44-45-48-50-60\"";

  "-warn-error",
  true,
  "<list>  Enable or disable error status for warnings according\n     to <list>.  See option -w for the syntax of <list>.\n     Default setting is \"-a+31\"";

  "-warn-help",
  false,
  " Show description of warning numbers";

  "-where",
  false,
  " Print location of standard library and exit";

  "-",
  true,
  "<file>  Treat <file> as a file name (even if it starts with `-')";

  "-nopervasives",
  false,
  " (undocumented)";

  "-use-prims",
  true,
  "<file>  (undocumented)";

  "-dsource",
  false,
  " (undocumented)";

  "-dparsetree",
  false,
  " (undocumented)";

  "-dtypedtree",
  false,
  " (undocumented)";

  "-drawlambda",
  false,
  " (undocumented)";

  "-dlambda",
  false,
  " (undocumented)";

  "-dinstr",
  false,
  " (undocumented)";

  "-dtimings",
  false,
  " Print timings";

  "-args",
  true,
  "<file> Read additional newline-terminated command line arguments\n      from <file>";

  "-args0",
  true,
  "<file> Read additional null character terminated command line arguments\nfrom <file>";

];;

let ocamldoc_spec = Some [
  "-absname",
  false,
  " Show absolute filenames in error messages";

  "-I",
  true,
  "<dir>  Add <dir> to the list of include directories";

  "-impl",
  true,
  "<file>  Compile <file> as a .ml file";

  "-intf",
  true,
  "<file>  Compile <file> as a .mli file";

  "-intf-suffix",
  true,
  "<string>  Suffix for interface files (default: .mli)";

  "-intf_suffix",
  true,
  "<string>  (deprecated) same as -intf-suffix";

  "-labels",
  false,
  " Use commuting label mode";

  "-modern",
  false,
  " (deprecated) same as -labels";

  "-alias-deps",
  false,
  " Do record dependencies for module aliases";

  "-no-alias-deps",
  false,
  " Do not record dependencies for module aliases";

  "-app-funct",
  false,
  " Activate applicative functors";

  "-no-app-funct",
  false,
  " Deactivate applicative functors";

  "-noassert",
  false,
  " Do not compile assertion checks";

  "-nolabels",
  false,
  " Ignore non-optional labels in types";

  "-nostdlib",
  false,
  " Do not add default directory to the list of include directories";

  "-open",
  true,
  "<module>  Opens the module <module> before typing";

  "-pp",
  true,
  "<command>  Pipe sources through preprocessor <command>";

  "-ppx",
  true,
  "<command>  Pipe abstract syntax trees through preprocessor <command>";

  "-principal",
  false,
  " Check principality of type inference";

  "-no-principal",
  false,
  " Do not check principality of type inference (default)";

  "-rectypes",
  false,
  " Allow arbitrary recursive types";

  "-no-rectypes",
  false,
  " Do not allow arbitrary recursive types (default)";

  "-safe-string",
  false,
  " Make strings immutable";

  "-short-paths",
  false,
  " Shorten paths in types";

  "-strict-sequence",
  false,
  " Left-hand part of a sequence must have type unit";

  "-no-strict-sequence",
  false,
  " Left-hand part of a sequence need not have type unit (default)";

  "-strict-formats",
  false,
  " Reject invalid formats accepted by legacy implementations\n     (Warning: Invalid formats may behave differently from\n      previous OCaml versions, and will become always-rejected\n      in future OCaml versions. You should always use this flag\n      to detect invalid formats so you can fix them.)";

  "-no-strict-formats",
  false,
  " Accept invalid formats accepted by legacy implementations (default)\n     (Warning: Invalid formats may behave differently from\n      previous OCaml versions, and will become always-rejected\n      in future OCaml versions. You should never use this flag\n      and instead fix invalid formats.)";

  "-thread",
  false,
  " Generate code that supports the system threads library";

  "-unboxed-types",
  false,
  " unannotated unboxable types will be unboxed";

  "-no-unboxed-types",
  false,
  " unannotated unboxable types will not be unboxed (default)";

  "-unsafe-string",
  false,
  " Make strings mutable (default)";

  "-v",
  false,
  " Print compiler version and location of standard library and exit";

  "-verbose",
  false,
  " Print calls to external commands";

  "-version",
  false,
  " Print version and exit";

  "--version",
  false,
  " Print version and exit";

  "-vmthread",
  false,
  " Generate code that supports the threads library with VM-level\n     scheduling";

  "-vnum",
  false,
  " Print version number and exit";

  "-w",
  true,
  "<list>  Enable or disable warnings according to <list>:\n        +<spec>   enable warnings in <spec>\n        -<spec>   disable warnings in <spec>\n        @<spec>   enable warnings in <spec> and treat them as errors\n     <spec> can be:\n        <num>             a single warning number\n        <num1>..<num2>    a range of consecutive warning numbers\n        <letter>          a predefined set\n     default setting is \"+a-4-6-7-9-27-29-32..39-41..42-44-45-48-50-60\"";

  "-",
  true,
  "<file>  Treat <file> as a file name (even if it starts with `-')";

  "-text",
  true,
  "<file> Consider <file> as a .txt file";

  "-warn-error",
  false,
  " Treat ocamldoc warnings as errors";

  "-show-missed-crossref",
  false,
  " Show missed cross-reference opportunities";

  "-hide-warnings",
  false,
  " do not print ocamldoc warnings";

  "-o",
  true,
  "<file> Set the output file name, used by texi, latex and dot generators\n\t\t(default is ocamldoc.out)\n\t\tor the prefix of index files for the HTML generator\n\t\t(default is index)";

  "-d",
  true,
  "<dir> Generate files in directory <dir>, rather than in current\n\t\tdirectory (for man and HTML generators)";

  "-sort",
  false,
  " Sort the list of top modules before generating the documentation";

  "-no-stop",
  false,
  " Do not stop at (**/**) comments";

  "-no-custom-tags",
  false,
  " Do not allow custom @-tags";

  "-stars",
  false,
  " Remove beginning blanks of comment lines, until the first '*'";

  "-inv-merge-ml-mli",
  false,
  " Inverse implementations and interfaces when merging";

  "-no-module-constraint-filter",
  false,
  "Do not filter module elements using module type constraints";

  "-keep-code",
  false,
  " Always keep code when available\n";

  "-dump",
  true,
  "<file> Dump collected information into <file>";

  "-load",
  true,
  "<file> Load information from <file> ; may be used several times\n";

  "-t",
  true,
  "<title> Use <title> as title for the generated documentation";

  "-intro",
  true,
  "<file> Use content of <file> as ocamldoc text to use as introduction\n\t\t(HTML, LaTeX and TeXinfo only)";

  "-hide",
  true,
  "<M1,M2.M3,...> Hide the given complete module names in generated doc";

  "-m",
  true,
  "<options> specify merge options between .mli and .ml\n\t\t<options> can be one or more of the following characters:\n\t\td  merge description\n\t\ta  merge @author\n\t\tv  merge @version\n\t\tl  merge @see\n\t\ts  merge @since\n\t\tb  merge @before\n\t\to  merge @deprecated\n\t\tp  merge @param\n\t\te  merge @raise\n\t\tr  merge @return\n\t\tc  merge custom @-tags\n\t\tA  merge all\n\n *** choosing a generator ***\n";

  "-html",
  false,
  " Generate HTML documentation";

  "-latex",
  false,
  " Generate LaTeX documentation";

  "-texi",
  false,
  " Generate TeXinfo documentation";

  "-man",
  false,
  " Generate man pages";

  "-dot",
  false,
  " Generate dot code of top modules dependencies";

  "-customdir",
  false,
  "Display custom generators standard directory and exit";

  "-i",
  true,
  "<dir> Add the given directory to the search path for custom\n\t\tgenerators";

  "-g",
  true,
  "<file.cm[o|a|xs]> Load file defining a new documentation generator\n\n *** HTML options ***\n";

  "-all-params",
  false,
  " Display the complete list of parameters for functions and\n\t\tmethods (HTML only)";

  "-css-style",
  true,
  "<file> Use content of <file> as CSS style definition (HTML only)";

  "-index-only",
  false,
  " Generate index files only (HTML only)";

  "-colorize-code",
  false,
  " Colorize code even in documentation pages (HTML only)";

  "-short-functors",
  false,
  " Use short form to display functor types (HTML only)";

  "-charset",
  true,
  "<s> Add information about character encoding being s\n\t\t(default is iso-8859-1)\n\n *** LaTeX options ***\n";

  "-noheader",
  false,
  " Suppress header in generated documentation\n\t\t(LaTeX and TeXinfo only)";

  "-notrailer",
  false,
  " Suppress trailer in generated documentation\n\t\t(LaTeX and TeXinfo only)";

  "-sepfiles",
  false,
  " Generate one file per toplevel module (LaTeX only)";

  "-latextitle",
  false,
  "n,style Associate {n } to the given sectionning style\n\t\t(e.g. 'section') in the latex output (LaTeX only)\n\t\tDefault sectionning is:\n\t\t 1 -> section\n\t\t 2 -> subsection\n\t\t 3 -> subsubsection\n\t\t 4 -> paragraph\n\t\t 5 -> subparagraph";

  "-latex-value-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of values.\n\t\t(default is \"val:\")";

  "-latex-type-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of types.\n\t\t(default is \"type:\")";

  "-latex-exception-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of exceptions.\n\t\t(default is \"exception:\")";

  "-latex-attribute-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of attributes.\n\t\t(default is \"val:\")";

  "-latex-method-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of methods.\n\t\t(default is \"method:\")";

  "-latex-module-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of modules.\n\t\t(default is \"module:\")";

  "-latex-module-type-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of module types.\n\t\t(default is \"moduletype:\")";

  "-latex-class-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of classes.\n\t\t(default is \"class:\")";

  "-latex-class-type-prefix",
  true,
  "<string>\n\t\tUse <string> as prefix for the LaTeX labels of class types.\n\t\t(default is \"classtype:\")";

  "-notoc",
  false,
  " Do not generate table of contents (LaTeX only)\n\n *** texinfo options ***\n";

  "-noindex",
  false,
  " Do not build index for Info files (TeXinfo only)";

  "-esc8",
  false,
  " Escape accentuated characters in Info files (TeXinfo only)";

  "-info-section",
  false,
  " Specify section of Info directory (TeXinfo only)";

  "-info-entry",
  false,
  " Specify Info directory entry (TeXinfo only)\n\n *** dot options ***\n";

  "-dot-colors",
  true,
  " <c1,c2,...,cn>\n\t\tUse colors c1,c1,...,cn in the dot output\n\t\t(default list is darkturquoise,darkgoldenrod2,cyan,green,\n\t\tmagenta,yellow,burlywood1,aquamarine,floralwhite,lightpink,\n\t\tlightblue,mediumturquoise,salmon,slategray3)";

  "-dot-include-all",
  false,
  " Include all modules in the dot output, not only the\n\t\tmodules given on the command line";

  "-dot-types",
  false,
  " Generate dependency graph for types instead of modules";

  "-dot-reduce",
  false,
  " Perform a transitive reduction on the selected dependency graph\n\t\tbefore the dot output\n\n *** man pages options ***\n";

  "-man-mini",
  false,
  " Generate man pages only for modules, module types, classes\n\t\tand class types (man only)";

  "-man-suffix",
  true,
  "<suffix> Use <suffix> for man page files (default is 3o) (man only)\n";

  "-man-section",
  true,
  "<section> Use <section> in man page files (default is 3) (man only)\n";

];;

