Subject: Re: `make UPDATE=1 build' fails in DHCP code
To: None <current-users@netbsd.org>
From: Samuel Hornus\[Isobel\] <Samuel.Hornus@crans.org>
List: current-users
Date: 06/30/2001 02:41:44
MESSAGE*S* FORWARDED TO THE LIST BECAUSE IT MAY ANSWER OTHER'S
QUESTIONS...

On Fri, 29 Jun 2001, Launey Thomas wrote:

> Could it be that your .depend files are out-of-date?
>
> Try something like
>
>     cd /usr/src/usr.sbin/dhcp/dst
>     make cleandist
>
> and then
>
>     cd /usr/src
>     make UPDATE=1 build
>
> Of course, there may be other .depend files that are out-of-date, but
> then it should fail somewhere else.
>
> Although it is a bit of an overkill, I typically blow away all .depend
> files (using find) after doing a CVS update and before "make obj".
>
> Hope this helps.

Sure, it works !

Thanks Thomas, Ivar and Launey.

what is the *precise* role of .depend files ?
A better formulation would be :
where is .depend file's role documented ?

From: Launey Thomas <ljt@alum.mit.edu>
To: Samuel.Hornus@crans.org
Subject: Re: `make UPDATE=1 build' fails in DHCP code

> I answer this post to ask this more question :
> what is the *precise* role of .depend files ?
> A better formulation would be :
> where is .depend file's role documented ?

.depend files contain "dependency" info for files being compiled.
Specifically, it contains the names of all files that are included by
a file being compiled (e.g., header files).  The format of the .depend
files is that of a make dependency.  For example, in
/usr/src/bin/cat/obj/.depend you will find something like:

    cat.o cat.ln: /usr/src/bin/cat/cat.c /usr/include/sys/cdefs.h \
     /usr/include/machine/cdefs.h /usr/include/sys/cdefs_elf.h \
     /usr/include/sys/param.h /usr/include/sys/null.h \
     /usr/include/sys/inttypes.h /usr/include/sys/stdint.h \
     /usr/include/machine/int_types.h /usr/include/machine/int_mwgwtypes.h \
     /usr/include/machine/int_limits.h /usr/include/machine/int_const.h \
     /usr/include/machine/int_fmtio.h /usr/include/sys/types.h \
     /usr/include/machine/types.h /usr/include/machine/ansi.h \
     /usr/include/sys/ansi.h /usr/include/machine/endian.h \
     /usr/include/sys/endian.h /usr/include/machine/endian_machdep.h \
     /usr/include/machine/byte_swap.h /usr/include/machine/bswap.h \
     /usr/include/sys/bswap.h /usr/include/sys/syslimits.h \
     /usr/include/sys/featuretest.h /usr/include/sys/signal.h \
     /usr/include/machine/signal.h /usr/include/machine/trap.h \
     /usr/include/machine/param.h /usr/include/machine/limits.h \
     /usr/include/sys/stat.h /usr/include/sys/time.h /usr/include/time.h \
     /usr/include/locale.h /usr/include/ctype.h /usr/include/err.h \
     /usr/include/errno.h /usr/include/sys/errno.h /usr/include/fcntl.h \
     /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h \
     /usr/include/strings.h /usr/include/unistd.h \
     /usr/include/sys/unistd.h

The files before the ':' depend on those following the ':'.

By default, make will pick up these .depend files.  See the manpage
make(1).

BTW, if you look at /usr/share/mk/bsd.dep.mk you will see that these
.depend files are created with "mkdep".  Such dependency files can
also be created with "cc -M"; I am not sure of the advantages of
"mkdep".

Enjoy.

                        - LT

-- 
Samuel.