Subject: Re: make and .OPTIONAL
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-toolchain
Date: 11/08/2003 17:41:42
In article <20031108050303.GM757@mewburn.net>,
Luke Mewburn <lukem@NetBSD.org> wrote:
>On Fri, Nov 07, 2003 at 07:19:35PM +0000, David Laight wrote:
> | I thought I'd try to stop the build failing when a .depend file
> | references an old .h file by changing mkdep so that it adds:
> |
> | .OPTIONAL: header.h .....
> |
> | This stops the build failing, but the program that depended on the
> | deleted .h file is always rebuilt.
>
>I'm not convinced that this is necessary. I'll defer to the make(1)
>gurus (sjg@, etc :) if they disagree.
>
>
>I was considering that an extra option to mkdep(1) to "validate .depend"
>(and return non-zero if files missing, but don't necessarily rebuild)
>and use that for this purpose. That would be quicker than doing the
>check in bsd.dep.mk with sed/make .for loop.
The problem is the dependall target. It does not wait for depend to finish
before it starts building.
christos