tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make: ignore stale .depend



On Fri, 26 Nov 2010 14:16:31 -0800, "Simon J. Gerraty" writes:
>I'll have a dig to see if there is any clue in the GNode, by the time
>Dir_MTime() is called which could avoid identify the .h vs .c case
>(the later being the only one that really matters - s/.[ch]/language of choice
>/)

Ok, whether gn->iParents is empty seems to be a useful clue.
If it is not empty, the node is an implied src (eg. for .c.o).
Adding that (you can see that foo.h is not searched for):

$ /var/obj/NetBSD/current/usr.bin/make/make     
make: ignoring stale .depend for /homes/sjg/make-tests/stale/stale0/foo.c, 
found /homes/sjg/make-tests/stale/stale2/foo.c
make: ignoring stale .depend for /homes/sjg/make-tests/stale/stale0/goo.c, 
found /homes/sjg/make-tests/stale/stale2/goo.c
make: ignoring stale .depend for /homes/sjg/make-tests/stale/stale0/foo.h
#   compile  src/foo.o
cc -O2 -g -I/homes/sjg/make-tests/stale/stale2/h   -Werror      -c    
/homes/sjg/make-tests/stale/stale2/foo.c
make: ignoring stale .depend for /homes/sjg/make-tests/stale/stale0/h/goo.h
#   compile  src/goo.o
cc -O2 -g -I/homes/sjg/make-tests/stale/stale2/h   -Werror      -c    
/homes/sjg/make-tests/stale/stale2/goo.c
#      link  src/stale
cc           -o stale  main.o foo.o goo.o          -Wl,-rpath-link,/lib  -L/lib 
-Wl,-rpath-link,/usr/lib  -L/usr/lib
$


Home | Main Index | Thread Index | Old Index