Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2016-06-24 23:50:15 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2016-06-25 19:04:15 +0300
commit041ea4106881a3434e63ca95a38c911515793f09 (patch)
treedd5ee281fad7be281b680f86e8730983e137eb3b /newlib/libc/Makefile.am
parentfdc45c4bfbf382cac03e0b8267771fd7c5f678e6 (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/libc/Makefile.am')
-rw-r--r--newlib/libc/Makefile.am23
1 files changed, 22 insertions, 1 deletions
diff --git a/newlib/libc/Makefile.am b/newlib/libc/Makefile.am
index 21a74fe78..6e97bca52 100644
--- a/newlib/libc/Makefile.am
+++ b/newlib/libc/Makefile.am
@@ -142,6 +142,9 @@ SUBDEFS = \
$(LIBC_EXTRA_DEF) \
misc/stmp-def
+# ditto for stmp-xml files in each subdirectory which builds .xml files
+SUBXMLS = $(SUBDEFS:stmp-def=stmp-xml)
+
libc.info: sigset.texi extra.texi stdio64.texi posix.texi iconvset.texi \
targetdep.tex $(SUBDEFS)
@@ -223,6 +226,23 @@ info_TEXINFOS = libc.texinfo
libc_TEXINFOS = sigset.texi extra.texi posix.texi stdio64.texi iconvset.texi \
targetdep.tex $(SUBDEFS)
+docbook-recursive: force
+ for d in $(SUBDIRS); do \
+ if test "$$d" != "."; then \
+ (cd $$d && $(MAKE) docbook) || exit 1; \
+ fi; \
+ done
+
+$(SUBXMLS): docbook-recursive
+
+man: $(SUBXMLS) libc.in.xml
+ xsltproc --xinclude --path ${builddir} --nonet ${srcdir}/../refcontainers.xslt ${srcdir}/libc.in.xml >libc.xml
+ xmlto --skip-validation man -m ${srcdir}/../man.xsl libc.xml
+
+install-man: man
+ mkdir -p $(DESTDIR)$(mandir)/man3
+ $(INSTALL_DATA) *.3 $(DESTDIR)$(mandir)/man3
+
.PHONY: force
force:
@@ -230,7 +250,8 @@ CLEANFILES = $(CRT0) \
sigset.texi stmp-sigset extra.texi stmp-extra \
stdio64.texi stmp-stdio64 targetdep.tex stmp-targetdep \
tmp-sigset.texi tmp-iconvset.texi tmp-extra.texi \
- tmp-stdio64.texi tmp-posix.texi tmp-targetdep.texi
+ tmp-stdio64.texi tmp-posix.texi tmp-targetdep.texi \
+ *.xml *.3
ACLOCAL_AMFLAGS = -I .. -I ../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host