summaryrefslogtreecommitdiff
path: root/gtkdoc-mkhtml.in
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-05-17 23:45:25 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-05-17 23:45:25 +0000
commit254c06837ab48439bb18fabb68f1d8e5d0424e0f (patch)
tree651fdb2708c5681c004bc472a2835642f2e732e2 /gtkdoc-mkhtml.in
parent3bb869349f641335e306f61a36322c5e95c8cd25 (diff)
downloadgtk-doc-254c06837ab48439bb18fabb68f1d8e5d0424e0f.tar.gz
Detect whether we're processing SGML or XML.
* gtkdoc-mkhtml.in: Detect whether we're processing SGML or XML. * gtkdoc-mkdb.in: New option --output-format to switch between SGML and XML output. * Makefile.am (EXTRA_DIST): Add xml.dcl * xml.dcl: The XML declaration.
Diffstat (limited to 'gtkdoc-mkhtml.in')
-rw-r--r--gtkdoc-mkhtml.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
index bd402f2..0679cb7 100644
--- a/gtkdoc-mkhtml.in
+++ b/gtkdoc-mkhtml.in
@@ -15,16 +15,24 @@ if test $# -ne 2; then
fi
module=$1
+document=$2
prefix=@prefix@
-gtkdocdir=@datadir@/gtk-doc/
+gtkdocdir=@datadir@/gtk-doc
+
+declaration=$gtkdocdir/gtk-doc.dcl
+
+if head -1 $document | grep -q "<?xml"; then
+ declaration=$gtkdocdir/xml.dcl
+fi
# Delete the old index.sgml file, if it exists.
if test -f index.sgml; then
rm -f index.sgml
fi
-@JADE@ -t sgml -w no-idref -d $gtkdocdir/gtk-doc.dsl $gtkdocdir/gtk-doc.dcl $2
+@JADE@ -t sgml -w no-idref -d $gtkdocdir/gtk-doc.dsl $declaration $document
sed s%href=\"%href=\"$module/% < index.sgml > index.sgml.tmp && mv index.sgml.tmp index.sgml
echo "timestamp" > ../html.stamp
+