aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/Makefile.am
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2016-06-24 21:50:15 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2016-07-04 14:17:10 +0100
commit0b4cbd2fb82ba588a82c148bd723e46dea05d523 (patch)
treefccdea463458c2cb5536c151b839ccfa42795eb5 /newlib/libc/Makefile.am
parent85db21730beb3bb40723fa9b9f2dea5016fc4b4c (diff)
downloadnewlib-0b4cbd2fb82ba588a82c148bd723e46dea05d523.zip
newlib-0b4cbd2fb82ba588a82c148bd723e46dea05d523.tar.gz
newlib-0b4cbd2fb82ba588a82c148bd723e46dea05d523.tar.bz2
Make newlib manpages (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 21a74fe..6e97bca 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