[gtk-doc] mkdb: add a --xml-mode alias for --sgml-mode



commit 2190c4fd213dd5849f6ea04708ac3fb1bb6a5c1b
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Sep 8 22:51:57 2010 +0300

    mkdb: add a --xml-mode alias for --sgml-mode
    
    Also mention xml-mode in the docs first and change it in examples/Makefile.am.
    Switch it in the tests. One day we can kill sgml support.

 examples/Makefile.am                |    4 ++--
 gtkdoc-mkdb.in                      |   17 +++++++++--------
 help/manual/C/gtk-doc-manual.xml    |    5 +++--
 tests/annotations/docs/Makefile.am  |    2 +-
 tests/bugs/docs/Makefile.am         |    2 +-
 tests/empty/docs/Makefile.am        |    2 +-
 tests/fail/docs/Makefile.am         |    2 +-
 tests/gobject/docs-tmpl/Makefile.am |    2 +-
 tests/gobject/docs/Makefile.am      |    2 +-
 9 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 1e36e16..86168b7 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -32,8 +32,8 @@ SCANGOBJ_OPTIONS=
 SCAN_OPTIONS=
 
 # Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--sgml-mode --output-format=xml
+# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
+MKDB_OPTIONS=--xml-mode --output-format=xml
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 3b39eef..ed215d9 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -44,7 +44,7 @@ my $PRINT_VERSION;
 my $PRINT_HELP;
 my $MAIN_SGML_FILE;
 my $EXPAND_CONTENT_FILES = "";
-my $SGML_MODE;
+my $INLINE_MARKUP_MODE;
 my $DEFAULT_STABILITY;
 my $DEFAULT_INCLUDES;
 my $OUTPUT_FORMAT;
@@ -62,7 +62,8 @@ my %optctl = ('module' => \$MODULE,
 	      'help' => \$PRINT_HELP,
 	      'main-sgml-file' => \$MAIN_SGML_FILE,
 	      'expand-content-files' => \$EXPAND_CONTENT_FILES,
-	      'sgml-mode' => \$SGML_MODE,
+	      'sgml-mode' => \$INLINE_MARKUP_MODE,
+	      'xml-mode' => \$INLINE_MARKUP_MODE,
 	      'default-stability' => \$DEFAULT_STABILITY,
 	      'default-includes' => \$DEFAULT_INCLUDES,
 	      'output-format' => \$OUTPUT_FORMAT,
@@ -74,8 +75,8 @@ GetOptions(\%optctl, "module=s", "source-dir:s", "source-suffixes:s",
     "ignore-files:s", "output-dir:s", "tmpl-dir:s", "version", "outputallsymbols",
     "outputsymbolswithoutsince",
     "expand-content-files:s", "main-sgml-file:s", "extra-db-files:s", "help",
-    "sgml-mode", "default-stability:s", "default-includes:s", "output-format:s",
-    "name-space:s");
+    "sgml-mode", "xml-mode", "default-stability:s", "default-includes:s", 
+    "output-format:s", "name-space:s");
 
 if ($PRINT_VERSION) {
     print "@VERSION \n";
@@ -105,7 +106,7 @@ gtkdoc-mkdb version @VERSION@ - generate docbook files
 --main-sgml-file=FILE      File containing the toplevel DocBook file.
 --expand-content-files=FILES Extra DocBook files to expand abbreviations in.
 --output-format=FORMAT     Format to use for the generated docbook, XML or SGML.
---sgml-mode                Allow DocBook markup in inline documentation.
+--{xml,sgml}-mode          Allow DocBook markup in inline documentation.
 --default-stability=LEVEL  Specify default stability Level. Valid values are
                            Stable, Unstable, or Private.
 --default-includes=FILENAMES Specify default includes for section Synopsis
@@ -2526,7 +2527,7 @@ sub CreateValidSGML {
 # Function    : ConvertSGMLChars
 # Description : This is used for text in source code comment blocks, to turn
 #               chars which are used in SGML into entities, e.g. '<' into
-#               '&lt;'. Depending on $SGML_MODE, this is done
+#               '&lt;'. Depending on $INLINE_MARKUP_MODE, this is done
 #               unconditionally or only if the character doesn't seem to be
 #               part of an SGML construct (tag or entity reference).
 # Arguments   : $text - the text to turn into proper SGML.
@@ -2535,8 +2536,8 @@ sub CreateValidSGML {
 sub ConvertSGMLChars {
     my ($symbol, $text) = @_;
 
-    if ($SGML_MODE) {
-        # For the SGML mode only convert to entities outside CDATA sections.
+    if ($INLINE_MARKUP_MODE) {
+        # For the XML/SGML mode only convert to entities outside CDATA sections.
         return &ModifyXMLElements ($text, $symbol,
 				   "<!\\[CDATA\\[|<programlisting[^>]*>",
 				   \&ConvertSGMLCharsEndTag,
diff --git a/help/manual/C/gtk-doc-manual.xml b/help/manual/C/gtk-doc-manual.xml
index da15f2f..9063be9 100644
--- a/help/manual/C/gtk-doc-manual.xml
+++ b/help/manual/C/gtk-doc-manual.xml
@@ -709,8 +709,9 @@ make
       <para>
         DocBook can do more that just links. One can also have lists, tables and
         examples. To enable the usage of SGML/XML tags inside doc-comments you
-        need to have <option>--sgml-mode</option> in the variable
-        <symbol>MKDB_OPTIONS</symbol> inside <filename>Makefile.am</filename>.
+        need to have <option>--xml-mode</option> or <option>--sgml-mode</option>
+        in the variable <symbol>MKDB_OPTIONS</symbol> inside 
+        <filename>Makefile.am</filename>.
       </para>
 
       <tip>
diff --git a/tests/annotations/docs/Makefile.am b/tests/annotations/docs/Makefile.am
index 67dc817..cbe57f3 100644
--- a/tests/annotations/docs/Makefile.am
+++ b/tests/annotations/docs/Makefile.am
@@ -23,7 +23,7 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
   2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/tests/bugs/docs/Makefile.am b/tests/bugs/docs/Makefile.am
index b17a15d..2e9ed16 100644
--- a/tests/bugs/docs/Makefile.am
+++ b/tests/bugs/docs/Makefile.am
@@ -24,7 +24,7 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
   2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/tests/empty/docs/Makefile.am b/tests/empty/docs/Makefile.am
index 339f112..67c2f57 100644
--- a/tests/empty/docs/Makefile.am
+++ b/tests/empty/docs/Makefile.am
@@ -23,7 +23,7 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
   2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/tests/fail/docs/Makefile.am b/tests/fail/docs/Makefile.am
index 262655e..338e435 100644
--- a/tests/fail/docs/Makefile.am
+++ b/tests/fail/docs/Makefile.am
@@ -23,7 +23,7 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
   2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/tests/gobject/docs-tmpl/Makefile.am b/tests/gobject/docs-tmpl/Makefile.am
index 5e8d974..9cf67ac 100644
--- a/tests/gobject/docs-tmpl/Makefile.am
+++ b/tests/gobject/docs-tmpl/Makefile.am
@@ -21,7 +21,7 @@ SCANGOBJ_OPTIONS=2>&1 | tee gtkdoc-scangobj.log
 SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" 2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
diff --git a/tests/gobject/docs/Makefile.am b/tests/gobject/docs/Makefile.am
index 41e095e..7aafb23 100644
--- a/tests/gobject/docs/Makefile.am
+++ b/tests/gobject/docs/Makefile.am
@@ -23,7 +23,7 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
   2>&1 | tee gtkdoc-scan.log
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--xml-mode 2>&1 | tee gtkdoc-mkdb.log
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]