diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-02-19 19:33:43 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-02-19 19:33:43 (GMT) |
commit | 969ea3f4491a8c3408bf59744545674b3a647657 (patch) | |
tree | 69b48e1c71c000d6723f9047427b69e7c92ee916 /Source/cmDocumentation.cxx | |
parent | ee2a13b11f08efcde4ec3579763ae3236b278693 (diff) | |
download | CMake-969ea3f4491a8c3408bf59744545674b3a647657.zip CMake-969ea3f4491a8c3408bf59744545674b3a647657.tar.gz CMake-969ea3f4491a8c3408bf59744545674b3a647657.tar.bz2 |
ENH: add support for creating the documentation in docbook format
(http://www.oasis-open.org/docbook/xml/4.2/), which users can then convert
to other formats.
Tested with meinproc from KDE, which generates HTML pages which look good.
Alex
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r-- | Source/cmDocumentation.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index d6d38a5..58e7455 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -324,6 +324,7 @@ void cmDocumentation::ClearSections() bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) { if ((this->CurrentFormatter->GetForm() != HTMLForm) + && (this->CurrentFormatter->GetForm() != DocbookForm) && (this->CurrentFormatter->GetForm() != ManForm)) { this->PrintVersion(os); @@ -636,6 +637,11 @@ cmDocumentation::Form cmDocumentation::GetFormFromFilename( return cmDocumentation::HTMLForm; } + if (ext == ".DOCBOOK") + { + return cmDocumentation::DocbookForm; + } + // ".1" to ".9" should be manpages if ((ext.length()==2) && (ext[1] >='1') && (ext[1]<='9')) { @@ -1216,7 +1222,8 @@ bool cmDocumentation::PrintDocumentationCustomModules(std::ostream& os) this->CreateCustomModulesSection(); this->AddSectionToPrint("Description"); this->AddSectionToPrint("Custom CMake Modules"); - this->AddSectionToPrint("Copyright"); +// the custom modules are most probably not under Kitware's copyright, Alex +// this->AddSectionToPrint("Copyright"); this->AddSectionToPrint("See Also"); this->CurrentFormatter->PrintHeader(this->GetNameString(), os); @@ -1373,6 +1380,9 @@ void cmDocumentation::SetForm(Form f) case HTMLForm: this->CurrentFormatter = &this->HTMLFormatter; break; + case DocbookForm: + this->CurrentFormatter = &this->DocbookFormatter; + break; case ManForm: this->CurrentFormatter = &this->ManFormatter; break; |