docs: enable building html docs with docbook2html
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 13 Feb 2012 10:28:13 +0000 (12:28 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Mar 2015 08:07:45 +0000 (10:07 +0200)
This is useful if sgml2x package is not available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
docs/Makefile
docs/local-nosgml2x.dsl [new file with mode: 0644]

index 91c3b0adf481fd4596beb358ddbe0c92af81340a..f1dac586600a9d1641525e8bb655afad7448b7e9 100644 (file)
@@ -25,10 +25,18 @@ GBP_VERSION=../gbp/version.py
 DEB_VERSION=$(shell sed -ne 's/^gbp_version="\([.a-z0-9~-]\+\)"/\1/p' $(GBP_VERSION))
 CHANGELOG=../debian/changelog
 
+# Stuff to build docs outside Debian
+HAVE_SGML2X ?= 1
+GTK_DOC_CATALOG_FILE ?= /usr/share/sgml/gtk-doc/gtk-doc.cat
+
 all: $(MANUAL) $(MANPAGES)
 
 $(MANUAL): manual.sgml chapters/*.sgml manpages/*.sgml
+ifeq ($(HAVE_SGML2X),1)
        docbook-2-html -s local $<
+else
+       docbook2html -d local-nosgml2x.dsl -c $(GTK_DOC_CATALOG_FILE) -o $(MANUAL) $<
+endif
        cp /usr/share/gtk-doc/data/*.png $(MANUAL)
 
 # We build manpages under 'buildxref/' just to get an updated cross-reference
diff --git a/docs/local-nosgml2x.dsl b/docs/local-nosgml2x.dsl
new file mode 100644 (file)
index 0000000..f9faab6
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY dbstyle PUBLIC "-//Gtk//DOCUMENT Gtk-doc HTML Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="gtk">
+<style-specification-body>
+
+;; Don't split up the doc as much.
+(define (chunk-element-list)
+  (list (normalize "preface")
+        (normalize "chapter")
+        (normalize "appendix")
+        (normalize "article")
+        (normalize "glossary")
+        (normalize "bibliography")
+        (normalize "index")
+        (normalize "colophon")
+        (normalize "setindex")
+        (normalize "reference")
+        (normalize "refentry")
+        (normalize "part")
+        (normalize "book") ;; just in case nothing else matches...
+        (normalize "set")  ;; sets are definitely chunks...
+        ))
+
+</style-specification-body>
+</style-specification>
+<external-specification id="gtk" document="dbstyle">
+</style-sheet>
+
+<!--
+# arch-tag: web stylesheet for documentation
+-->