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:
authorMike Frysinger <vapier@gentoo.org>2022-01-22 06:50:42 +0300
committerMike Frysinger <vapier@gentoo.org>2022-02-05 08:17:54 +0300
commit6026ef29d8c847716a745bb6e11aa1d2c36a2b64 (patch)
tree40480f5dca7020ed9a6aaa762e4faede55b1cf8d /newlib/libm/Makefile.inc
parentfc2b4ffee0ec7697a02ae7185f1acb7927f2f115 (diff)
newlib: move man page generation into top-level build
This allows building the libc & libm pages in parallel, and drops the duplication in the subdirs with the chew/chapter settings. The unused rules in Makefile.shared are left in place to minimize noise in the change.
Diffstat (limited to 'newlib/libm/Makefile.inc')
-rw-r--r--newlib/libm/Makefile.inc24
1 files changed, 23 insertions, 1 deletions
diff --git a/newlib/libm/Makefile.inc b/newlib/libm/Makefile.inc
index 39418cc79..f2f192ea8 100644
--- a/newlib/libm/Makefile.inc
+++ b/newlib/libm/Makefile.inc
@@ -4,6 +4,7 @@ info_TEXINFOS += %D%/libm.texi
LIBM_CHEWOUT_FILES =
LIBM_CHAPTERS =
+LIBM_DOCBOOK_OUT_FILES = $(LIBM_CHEWOUT_FILES:.def=.xml)
%D%/libm.dvi: %D%/targetdep.tex $(LIBM_CHEWOUT_FILES)
@@ -13,6 +14,25 @@ LIBM_CHAPTERS =
$(AM_V_at)touch $@
%D%/targetdep.tex: %D%/targetdep.tex.stamp; @true
+%D%/libm.xml.stamp: %D%/libm.in.xml $(LIBM_CHAPTERS) $(LIBM_DOCBOOK_OUT_FILES)
+ $(AM_V_at)\
+ for chapter in $(LIBM_CHAPTERS); do \
+ $(TEXI2DOCBOOK) < $(srcdir)/$$chapter > %D%/`basename $${chapter%.tex}`.xml || exit 1; \
+ done
+ $(AM_V_GEN)xsltproc --xinclude --path $(builddir)/%D% --nonet $(srcdir)/refcontainers.xslt $< > $@.tmp
+ $(AM_V_at)$(SHELL) $(newlib_basedir)/../move-if-change $@.tmp $(@:.stamp=)
+ $(AM_V_at)touch $@
+%D%/libm.xml: %D%/libm.xml.stamp; @true
+
+%C%_man: %D%/libm.xml
+ $(AM_V_GEN)xmlto --skip-validation -o %D% --searchpath $(builddir)/%D% man -m $(srcdir)/man.xsl %D%/libm.xml
+man: %C%_man
+
+%C%_install-man: %C%_man
+ $(MKDIR_P) $(DESTDIR)$(mandir)/man3
+ $(INSTALL_DATA) %D%/*.3 $(DESTDIR)$(mandir)/man3/
+install-man: %C%_install-man
+
include %D%/common/Makefile.inc
include %D%/complex/Makefile.inc
include %D%/fenv/Makefile.inc
@@ -25,4 +45,6 @@ endif
CLEANFILES += \
%D%/targetdep.tex \
%D%/targetdep.tex.stamp \
- $(LIBM_CHEWOUT_FILES)
+ $(LIBM_CHEWOUT_FILES) \
+ $(LIBM_DOCBOOK_OUT_FILES) \
+ %D%/*.xml %D%/*.xml.stamp %D%/*.3