Generate in build tree rather than source tree

Mike Frysinger
Sat Oct 29 13:32:26 GMT 2022

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/ 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/ 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 
> does contain $(srcdir)/doc/
> Would it be possible to have this 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:
> '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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the Newlib mailing list