]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#10,!3] Generated API is now an appendix
authorTomek Mrugalski <tomasz@isc.org>
Tue, 2 Oct 2018 13:31:18 +0000 (15:31 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 29 Oct 2019 17:57:13 +0000 (18:57 +0100)
doc/Makefile.am
doc/docgen/kea_docgen.cc
doc/guide/kea-guide.xml

index 2b21e409c4134f6b34c32f677eed7a2546bc973f..611e12f14b04a90f6050257031b4074f6351d2bc 100644 (file)
@@ -92,4 +92,4 @@ docgen:
 # That's a bit of a hack, but we are making sure that devel target
 # is always valid. The alternative is to make devel depend on all
 # *.cc *.h files in the whole tree.
-.PHONY: devel guide
+.PHONY: devel guide docgen
index 88386c7c1b093bd848322f7e1fd2495e86c34518..28b2ebb52dcf403b8233cf12566b2f818c771a74 100644 (file)
@@ -177,8 +177,8 @@ public:
         for (auto cmd : cmds_) {
             if (!first) {
                 f << ", ";
-                generateCmdLink(f, cmd.first);
             }
+            generateCmdLink(f, cmd.first);
 
             first = false;
         }
@@ -215,7 +215,6 @@ public:
             bool first = true;
             for (auto cmd : cmds_) {
 
-                first = true;
                 auto daemons = cmd.second->get("support");
                 for (auto d : daemons->listValue()) {
                     if (d->stringValue() == daemon) {
@@ -239,7 +238,6 @@ public:
             bool first = true;
             for (auto cmd : cmds_) {
 
-                first = true;
                 auto daemon_hook = cmd.second->get("hook");
                 if (!daemon_hook || daemon_hook->stringValue() != hook) {
                     continue;
@@ -263,7 +261,7 @@ public:
 
         generateCopyright(f);
 
-        f << "<chapter xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xml:id=\"api\">"
+        f << "<appendix xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xml:id=\"api\">"
           << endl;
         f << "  <title>API Reference</title>" << endl;
 
@@ -273,7 +271,7 @@ public:
         // Generate actual commands references.
         generateCommands(f);
 
-        f << "</chapter>" << endl;
+        f << "</appendix>" << endl;
 
         ofstream file(OUTPUT.c_str(), ofstream::trunc);
         file << f.str();
index fb07d213f5e150366eace667933821e6bd0bd538..2424beaa9ac56307ed96586a3a923a1214d93345 100644 (file)
 
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="netconf.xml"/>
 
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="faq.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+              href="faq.xml"/>
 
-  <chapter xml:id="acknowledgments">
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="api.xml"/>
+
+  <appendix xml:id="acknowledgments">
       <title>Acknowledgments</title>
 
       <para>Kea is an open source project designed, developed, and maintained by Internet Systems
       <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.tcinet.ru/">Technical Center of Internet</link>
       .</para>
 
-    </chapter>
-
-
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="api.xml"/>
+    </appendix>
 
 <!-- TODO: Add bibliography section (mostly RFCs, probably) -->