Simplify rules for creating man pages

Simplify rules for creating docbook XML used to create manpages:
Updating the output using move-if-change and then unconditionally
touching the .stamp file doesn't make much sense.
This commit is contained in:
Jon Turney 2022-05-02 13:55:13 +01:00 committed by Jeff Johnston
parent 5cad308baa
commit 3d64a500f1
2 changed files with 6 additions and 10 deletions

View File

@ -15,15 +15,13 @@ $(LIBC_CHEWOUT_FILES): $(MKDOC)
$(AM_V_at)touch $@
%D%/targetdep.tex: %D%/targetdep.tex.stamp; @true
%D%/libc.xml.stamp: %D%/libc.in.xml $(LIBC_CHAPTERS) $(LIBC_DOCBOOK_OUT_FILES)
%D%/libc.xml: %D%/libc.in.xml $(LIBC_CHAPTERS) $(LIBC_DOCBOOK_OUT_FILES)
$(AM_V_at)\
for chapter in $(LIBC_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%/libc.xml: %D%/libc.xml.stamp; @true
$(AM_V_at)$(SHELL) $(newlib_basedir)/../move-if-change $@.tmp $@
%C%_man: %D%/libc.xml
$(AM_V_GEN)xmlto --skip-validation -o %D% --searchpath $(builddir)/%D% man -m $(srcdir)/man.xsl %D%/libc.xml
@ -69,4 +67,4 @@ CLEANFILES += \
%D%/targetdep.tex.stamp \
$(LIBC_CHEWOUT_FILES) \
$(LIBC_DOCBOOK_OUT_FILES) \
%D%/*.xml %D%/*.xml.stamp %D%/*.3
%D%/*.xml %D%/*.3

View File

@ -15,15 +15,13 @@ $(LIBM_CHEWOUT_FILES): $(MKDOC)
$(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)
%D%/libm.xml: %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
$(AM_V_at)$(SHELL) $(newlib_basedir)/../move-if-change $@.tmp $@
%C%_man: %D%/libm.xml
$(AM_V_GEN)xmlto --skip-validation -o %D% --searchpath $(builddir)/%D% man -m $(srcdir)/man.xsl %D%/libm.xml
@ -88,4 +86,4 @@ CLEANFILES += \
%D%/targetdep.tex.stamp \
$(LIBM_CHEWOUT_FILES) \
$(LIBM_DOCBOOK_OUT_FILES) \
%D%/*.xml %D%/*.xml.stamp %D%/*.3
%D%/*.xml %D%/*.3