From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 8C7923858437 for ; Tue, 1 Feb 2022 23:12:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C7923858437 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 455453431A1; Tue, 1 Feb 2022 23:12:18 +0000 (UTC) Date: Tue, 1 Feb 2022 18:12:17 -0500 From: Mike Frysinger To: Jon Turney Cc: "newlib@sourceware.org" Subject: Re: [PATCH 4/5 v3] newlib: move man page generation into top-level build Message-ID: Mail-Followup-To: Jon Turney , "newlib@sourceware.org" References: <20220122043208.21962-1-vapier@gentoo.org> <20220201062107.19266-1-vapier@gentoo.org> <20220201062107.19266-4-vapier@gentoo.org> <40acd8d2-b43f-e65e-d612-93d327a3052e@dronecode.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hmUJ9AriZMZWZn/W" Content-Disposition: inline In-Reply-To: <40acd8d2-b43f-e65e-d612-93d327a3052e@dronecode.org.uk> X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2022 23:12:20 -0000 --hmUJ9AriZMZWZn/W Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01 Feb 2022 14:37, Jon Turney wrote: > On 01/02/2022 06:21, Mike Frysinger wrote: > > +%D%/libc.xml.stamp: %D%/libc.in.xml $(LIBC_CHAPTERS) $(LIBC_DOCBOOK_OU= T_FILES) > > + $(AM_V_at)\ > > + for chapter in $(LIBC_CHAPTERS); do \ > > + $(TEXI2DOCBOOK) < $(srcdir)/$$chapter > %D%/`basename $${chapter%.t= ex}`.xml || exit 1; \ > > + done > > + $(AM_V_GEN)xsltproc --xinclude --path $(builddir)/%D% --nonet $(srcdi= r)/refcontainers.xslt $< > $@.tmp > > + $(AM_V_at)$(SHELL) $(newlib_basedir)/../move-if-change $@.tmp $(@:.st= amp=3D) > > + $(AM_V_at)touch $@ > > +%D%/libc.xml: %D%/libc.xml.stamp; @true >=20 > This doesn't seem right. >=20 > This rule produces a single output with a definite name 'lib.xml', so=20 > there's no need for a timestamp file? you can use this exact same argument for targetdep.tex. i don't see why we= 'd use the stamp idiom for one but not the other. they both gather multiple inputs and produce a single output. i'm fine killing off the stamp logic entirely and changing move-if-change to a plain mv, and skipping the minor timestamp optimization altogether. we obviously don't write directly to $@ in order to avoid an interrupt producing an incomplete file that the build cannot recover itself. the older rules that i'm replacing had more expensive checks for their inpu= ts (using recursive makes and recursive stamps), but by merging the Makefiles all into one, we have full direct visibility into all the inputs. but that aspect doesn't matter to what these specific stamp files are saving: keeping timestamp shifts from forcing info & pdf & html & man regens. afaict, the only arguments for this are (1) dev time optimization (building =66rom git) and (2) release time requirements (toolchain builders don't need full texinfo stack as the dist tarball includes the info/pdf/etc...). the stamp files gets us (1) but not (2) because the newlib dists have never had the docs included. i think it's just a tarball of the git state. old rules: targetdep.tex: stmp-targetdep ; @true stmp-targetdep: force rm -f tmp.texi targetdoc=3D`pwd`/tmp.texi; \ for d in $(SUBDIRS); do \ if test "$$d" !=3D "."; then \ (cd $$d && $(MAKE) doc) || exit 1; \ fi; \ done $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi targetdep.tex touch $@ man: math/stmp-xml complex/stmp-xml libm.in.xml xsltproc --xinclude --path ${builddir} --nonet ${srcdir}/../refcontaine= rs.xslt ${srcdir}/libm.in.xml >libm.xml ... docbook-recursive: force for d in $(SUBDIRS); do \ if test "$$d" !=3D "."; then \ (cd $$d && $(MAKE) docbook) || exit 1; \ fi; \ done math/stmp-xml complex/stmp-xml: docbook-recursive new rules don't have any recursive makes: LIBM_CHAPTERS =3D %D%/targetdep.tex: $(LIBM_CHAPTERS) $(AM_V_GEN)cat $^ > $@.tmp $(AM_V_at)mv $@.tmp $@ LIBM_DOCBOOK_OUT_FILES =3D .def -> .xml f= iles> %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 $@ $(AM_V_at)touch $@ -mike --hmUJ9AriZMZWZn/W Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmH5vlEACgkQQWM7n+g3 9YEZEA//SWWxB+KrHnmgAPMb3pk/wEu0UNmzoNPKHXQBKckRxrv3ZEmNISJy5rak mq64pSBKI9tb+h2nvJes/fFBXFwSg9RJ7pjchXZE7CWqmfTmySjXnRD9PDUoVEG+ IN7JOf+CJhhIPNasmGL4FY7XBUw3xUBi+uahpdgprWgjbTfg51+n7wJX6Rr43UJb ZDecxYCTsg1uwrMIG1sj8WiP1hG2pmTk6kdw5zyGI+3e3D1fZpFvQXa1eBUfCXu/ SkEL7QZgNA3kInP9uO98D6RMh2ZHXo0UV02dW4eJklk80nMfr59fDk7q50K67gaM KwZ+uMFTqPMwY3rfnw5IDhD3eAXw6FCw/NH1l69jtE8UlCFXXh5G7itG+X2IJAzY VqpjQ2dh2izZcjKiHzgGomOcFVCrniF7BbTsdFBHdwaaaHwcQ1U0QUq4WMJRtK1O 9fcOmsbV3GQV4J054HX3Uhk3KwWg27xKt9w/Mhj+OzopuGY1Emz+hOdwrVxJ2rZP BAJMEuVNVaeHe6ldX7SnBRnLa8uFDFUQrFticosO45Tu3z9Br5SEOawdC9n/iuAI p58f0wW749WNAdjdguBvrODjgcV4gmB4gqK3IBQgbn44OUxVtaN1GC32+5c6NR1N S64M4w7a2BQ+WDz2VYzFJAH4fDM2TjH6eToLLmgzI8nmLstiMSY= =CZrb -----END PGP SIGNATURE----- --hmUJ9AriZMZWZn/W--