This is the mail archive of the
mailing list for the glibc project.
Re: One cause of spurious rebuilds
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Sun, 2 Nov 2003 14:00:57 -0500
- Subject: Re: One cause of spurious rebuilds
- References: <20031102185751.GA11238@nevyn.them.org>
On Sun, Nov 02, 2003 at 01:57:51PM -0500, Daniel Jacobowitz wrote:
> A result from the changed mkdep handling. When math/m_isinf.o is first
> built, there is no .d file for it. The "m_%.c: sysdeps/foo_%.c" rule
> triggers, and math/m_isinf.c is created as an intermediate dependency.
> Therefore it's removed when we're done with it.
> During a second time through make, the .d is loaded. m_isinf.o now
> explicitly depends on m_isinf.c, so it is not an intermediate file; so the
> fact that it is missing can no longer be ignored. It is built, and this
> time left around. libm is rebuilt.
> Solution? I'm not sure; you might think that this would work:
> .INTERMEDIATE: $(foreach s,.c .S l.c l.S f.c f.S,$(calls:s_%=$(objpfx)m_%$s))
> but it doesn't; it declares that there is an intermediate target with each
> of those names, and in fact there are only intermediate targets with half of
> those names. This causes it to try to build m_isinf.S instead of m_isinf.o.
> I hate recursive make.
Oh, just ".SECONDARY:" with no dependencies will do it; I don't know if
that's acceptable. If it is it should probably just go in Makerules.
MontaVista Software Debian GNU/Linux Developer