Merge branch 'doc-full-help' into release

This commit is contained in:
Brad King 2014-04-25 08:43:00 -04:00
commit 6293d1ba76
4 changed files with 20 additions and 3 deletions

View File

@ -11,6 +11,12 @@
If a file is specified, the version is written into it. If a file is specified, the version is written into it.
|file| |file|
``--help-full [<f>]``
Print all help manuals and exit.
All manuals are printed in a human-readable text format.
|file|
``--help-manual <man> [<f>]`` ``--help-manual <man> [<f>]``
Print one help manual and exit. Print one help manual and exit.

View File

@ -30,6 +30,8 @@ static const char *cmDocumentationStandardOptions[][2] =
"Print usage information and exit."}, "Print usage information and exit."},
{"--version,-version,/V [<f>]", {"--version,-version,/V [<f>]",
"Print version number and exit."}, "Print version number and exit."},
{"--help-full [<f>]",
"Print all help manuals and exit."},
{"--help-manual <man> [<f>]", {"--help-manual <man> [<f>]",
"Print one help manual and exit."}, "Print one help manual and exit."},
{"--help-manual-list [<f>]", {"--help-manual-list [<f>]",
@ -112,6 +114,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
{ {
case cmDocumentation::Usage: case cmDocumentation::Usage:
return this->PrintDocumentationUsage(os); return this->PrintDocumentationUsage(os);
case cmDocumentation::Full:
return this->PrintHelpFull(os);
case cmDocumentation::OneManual: case cmDocumentation::OneManual:
return this->PrintHelpOneManual(os); return this->PrintHelpOneManual(os);
case cmDocumentation::OneCommand: case cmDocumentation::OneCommand:
@ -364,9 +368,9 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
} }
else if(strcmp(argv[i], "--help-full") == 0) else if(strcmp(argv[i], "--help-full") == 0)
{ {
help.HelpType = cmDocumentation::Full;
GET_OPT_ARGUMENT(help.Filename); GET_OPT_ARGUMENT(help.Filename);
cmSystemTools::Message("Warning: --help-full no longer supported"); this->WarnFormFromFilename(help, result);
return true;
} }
else if(strcmp(argv[i], "--help-html") == 0) else if(strcmp(argv[i], "--help-html") == 0)
{ {
@ -677,6 +681,12 @@ bool cmDocumentation::PrintFiles(std::ostream& os,
return found; return found;
} }
//----------------------------------------------------------------------------
bool cmDocumentation::PrintHelpFull(std::ostream& os)
{
return this->PrintFiles(os, "index");
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmDocumentation::PrintHelpOneManual(std::ostream& os) bool cmDocumentation::PrintHelpOneManual(std::ostream& os)
{ {

View File

@ -102,6 +102,7 @@ private:
bool PrintFiles(std::ostream& os, std::string const& pattern); bool PrintFiles(std::ostream& os, std::string const& pattern);
bool PrintVersion(std::ostream& os); bool PrintVersion(std::ostream& os);
bool PrintHelpFull(std::ostream& os);
bool PrintHelpOneManual(std::ostream& os); bool PrintHelpOneManual(std::ostream& os);
bool PrintHelpOneCommand(std::ostream& os); bool PrintHelpOneCommand(std::ostream& os);
bool PrintHelpOneModule(std::ostream& os); bool PrintHelpOneModule(std::ostream& os);

View File

@ -26,7 +26,7 @@ public:
/** Types of help provided. */ /** Types of help provided. */
enum Type enum Type
{ {
None, Version, Usage, ListManuals, None, Version, Usage, Full, ListManuals,
ListCommands, ListModules, ListProperties, ListVariables, ListPolicies, ListCommands, ListModules, ListProperties, ListVariables, ListPolicies,
OneManual, OneCommand, OneModule, OneProperty, OneVariable, OnePolicy, OneManual, OneCommand, OneModule, OneProperty, OneVariable, OnePolicy,
OldCustomModules OldCustomModules