libc/newlib/Makefile.shared
Jon Turney 0b4cbd2fb8 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
2016-07-04 14:17:10 +01:00

43 lines
951 B
Makefile

objectlist.awk.in: $(noinst_LTLIBRARIES)
-rm -f objectlist.awk.in
for i in `ls *.lo` ; \
do \
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
#
# documentation rules
#
SUFFIXES = .def .xml
CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
TARGETDOC ?= ../tmp.texi
doc: $(CHEWOUT_FILES)
for chapter in $(CHAPTERS) ; \
do \
cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
done
DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py
DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml)
DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml)
.c.xml:
$(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false )
@touch stmp-xml
docbook: $(DOCBOOK_OUT_FILES)
for chapter in $(DOCBOOK_CHAPTERS) ; \
do \
${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \
done
CLEANFILES = $(CHEWOUT_FILES) $(CHEWOUT_FILES:.def=.ref) $(DOCBOOK_OUT_FILES)