diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-06-24 23:50:15 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-06-25 19:04:15 +0300 |
commit | 041ea4106881a3434e63ca95a38c911515793f09 (patch) | |
tree | dd5ee281fad7be281b680f86e8730983e137eb3b /newlib/libm | |
parent | fdc45c4bfbf382cac03e0b8267771fd7c5f678e6 (diff) |
Make newlib manpages via DocBook XML (v3)
Add makedocbook, a tool to process makedoc markup and output DocBook XML
refentries.
Process all the source files which are processed with makedoc with
makedocbook as well
Add chapter-texi2docbook, a tool to automatically generate DocBook XML
chapter files from the chapter .texi files. For generating man pages all we
care about is the content of the refentries, so all this needs to do is
convert the @include of the makedoc generated .def files to xi:include of
the makedocbook generated .xml files.
Add skeleton Docbook XML book files, lib[cm].in.xml which include these
generated chapters, which in turn include the generated files containing
refentries, which is processed with xsltproc to generate the lib[cm].xml
Add new make targets to generate and install man pages from lib[cm].xml
Diffstat (limited to 'newlib/libm')
-rw-r--r-- | newlib/libm/Makefile.am | 19 | ||||
-rw-r--r-- | newlib/libm/libm.in.xml | 14 | ||||
-rw-r--r-- | newlib/libm/machine/Makefile.am | 2 |
3 files changed, 34 insertions, 1 deletions
diff --git a/newlib/libm/Makefile.am b/newlib/libm/Makefile.am index bc458165f..8bc2c2cfe 100644 --- a/newlib/libm/Makefile.am +++ b/newlib/libm/Makefile.am @@ -58,10 +58,27 @@ math/stmp-def: stmp-targetdep ; @true complex/stmp-def: stmp-targetdep ; @true +docbook-recursive: force + for d in $(SUBDIRS); do \ + if test "$$d" != "."; then \ + (cd $$d && $(MAKE) docbook) || exit 1; \ + fi; \ + done + +math/stmp-xml complex/stmp-xml: docbook-recursive + +man: math/stmp-xml complex/stmp-xml libm.in.xml + xsltproc --xinclude --path ${builddir} --nonet ${srcdir}/../refcontainers.xslt ${srcdir}/libm.in.xml >libm.xml + xmlto --skip-validation --searchpath ${builddir} man -m ${srcdir}/../man.xsl libm.xml + +install-man: man + mkdir -p $(DESTDIR)$(mandir)/man3 + $(INSTALL_DATA) *.3 $(DESTDIR)$(mandir)/man3/ + .PHONY: force force: -CLEANFILES = tmp.texi targetdep.tex stmp-targetdep +CLEANFILES = tmp.texi targetdep.tex stmp-targetdep *.xml *.3 ACLOCAL_AMFLAGS = -I .. -I ../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/libm.in.xml b/newlib/libm/libm.in.xml new file mode 100644 index 000000000..dea8a0f6c --- /dev/null +++ b/newlib/libm/libm.in.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> +<book id="libm" xmlns:xi="http://www.w3.org/2001/XInclude"> + <bookinfo> + <productname>newlib</productname> + </bookinfo> + + <xi:include href="complex.xml"/> + <xi:include href="math.xml"/> + + <!-- processing should insert index here --> + <index/> + +</book> diff --git a/newlib/libm/machine/Makefile.am b/newlib/libm/machine/Makefile.am index a0881ec30..d67175b10 100644 --- a/newlib/libm/machine/Makefile.am +++ b/newlib/libm/machine/Makefile.am @@ -22,5 +22,7 @@ $(libm_machine_dir)/lib.a: doc: +docbook: + ACLOCAL_AMFLAGS = -I ../.. -I ../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host |