public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
To: <newlib@sourceware.org>
Subject: Re: Generate porting.info in build tree rather than source tree
Date: Sat, 29 Oct 2022 17:38:01 +0200	[thread overview]
Message-ID: <407c1d77-494e-b091-3390-4e8415631056@foss.st.com> (raw)
In-Reply-To: <Y10raq2js8x+nraS@vapier>

Hi Mike,

Thanks for your reply.

On 2022-10-29 15:32, Mike Frysinger wrote:
> On 28 Oct 2022 17:40, Torbjorn SVENSSON wrote:
>> With the recent improvements in the build system by Mike Frysinger, I've
>> noticed a minor regression.
> 
> this is not new behavior.  you can check out newlib-4.1.0 which doesn't
> contain any of my build changes and it does the same thing.
> 
>> When building newlib, the file libgloss/doc/porting.info is always
>> created in the source tree rather than the build tree. Looking at the
>> libgloss/Makefile.* files, it appears that this is derived from the
>> libgloss/doc/Makefile.inc line:
>> info_TEXINFOS += %D%/porting.texi
>>
>> To my knowledge (no automake wiz...), %D% is a relative path, so I
>> suppose the generated path should not use $(srcdir), yet the Makefile.in
>> does contain $(srcdir)/doc/porting.info.
>>
>> Would it be possible to have this porting.info file generated in the
>> build tree rather than the source tree to avoid having the source tree
>> in a dirty state after a build?
> 
> this is WAI.  info files are distributed with releases, so it should be
> generated in the source tree.  this is documented here:
> https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets
>> 'info'
>> Normally a GNU distribution comes with Info files, and that means the Info
>> files are present in the source directory. Therefore, the Make rule for an
>> info file should update it in the source directory. When users build the
>> package, ordinarily Make will not update the Info files because they will
>> already be up to date.
> -mike

Okay, so in that case, something changed in the newlib build process to 
generate and install the porting.info file as it was not required in the 
Arm snapshot included in their 10.3-2021.10 release (commit 
2a3a03972b35377aef8d3d52d873ac3b8fcc512c in newlib tree).

You can find the source tree of the 10.3-2021.10 release here:
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-src.tar.bz2

In the tarball, there is a build-toolchain.sh that builds newlib using:

  $SRCDIR/$NEWLIB/configure  \
         $NEWLIB_CONFIG_OPTS \
         --target=$TARGET \
         --prefix=$INSTALLDIR_NATIVE \
         --infodir=$INSTALLDIR_NATIVE_DOC/info \
         --mandir=$INSTALLDIR_NATIVE_DOC/man \
         --htmldir=$INSTALLDIR_NATIVE_DOC/html \
         --pdfdir=$INSTALLDIR_NATIVE_DOC/pdf \
         --enable-newlib-io-long-long \
         --enable-newlib-io-c99-formats \
         --enable-newlib-reent-check-verify \
         --enable-newlib-register-fini \
         --enable-newlib-retargetable-locking \
         --disable-newlib-supplied-syscalls \
         --disable-nls
     make -j$JOBS
     make pdf
     make html

According to the build I did yesterday of a more recent snapshot of 
newlib (bfee9c6ab0c3c9a5742e84509d01ec6472aa62c4), the porting.info file 
is generated by the "make -j$JOBS" command.

Please note that I do get porting.info, but not libc.info, libm.info or 
any other .info files in my build. I suppose a build should generate all 
.info files or none from the source tree?

Kind regards,
Torbjörn

  reply	other threads:[~2022-10-29 15:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 15:40 Torbjorn SVENSSON
2022-10-29 13:32 ` Mike Frysinger
2022-10-29 15:38   ` Torbjorn SVENSSON [this message]
2022-10-30  7:12     ` Mike Frysinger
2022-10-31 15:10       ` Torbjorn SVENSSON
2022-11-04  0:29         ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=407c1d77-494e-b091-3390-4e8415631056@foss.st.com \
    --to=torbjorn.svensson@foss.st.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).