On Wed, Sep 07, 2011 at 08:13:20AM +0000, David Holland wrote: > > The fundamental problem is that the make library finds files by > implicit path searches (of various kinds) which is inherently wobbly > no matter how many bandaids are applied.
Especially in large items like libc andthe kernel... > The robust approach is to change the makefiles to do > > .for S in $(SRCS:M*.c) > $(OBJDIR)/$(S:T:R).o: $(S) > $(COMPILE.c) $(S) -o $(.TARGET) > .endfor I tried to do that (without the actual commands) just to force the .o file to depend on the relevant .c .S (or .cpp) file. It would save make doing a lot of stat() calls searching for the source - and always get the right one when, for example, libc has a .S file that you don't want. Unfortunately it all exploded due to the way lex and yacc generate stuff. In my case I was still using the commands from the suffix rule. David -- David Laight: da...@l8s.co.uk