Subject: Re: tools/Makefile parallel make issue
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 07/06/2006 19:57:56
On Thu, Jul 06, 2006 at 05:25:02PM +0200, Lubomir Sedlacik wrote:
> 
> the failure was caused by a "cleandir" running in parallel within the
> same directory "dependall" was just spawned (running configure at the
> moment), in tools/compat.
> 
> the problem seems to lie in src/tools/Makefile:
> 
>   realall realdepend: .MAKE
>   .if "${PREVIOUSTOOLDIR}" != "${TOOLDIR}"
>           @echo "*** WARNING: TOOLDIR has moved?"
>           @echo "*** PREVIOUSTOOLDIR '${PREVIOUSTOOLDIR}'"
>           @echo "***     !=  TOOLDIR '${TOOLDIR}'"
>           @echo "*** Cleaning mis-matched tools"
>           rm -f PREVIOUSTOOLDIR
>           (cd ${.CURDIR} && ${MAKE} cleandir)
>   .endif

There is no way to get a single make command to execute commands that
delete files and commands that create the same ones.

The only solution I can see is moving the 'delete old tools' logic
into build.sh.
(Or maybe getting it done as the makefle is parsed).

Usually we get away with the parallel cleandir and 'make obj'.

	David

-- 
David Laight: david@l8s.co.uk