On Tue, Sep 06, 2011 at 02:53:58PM +0400, Valeriy E. Ushakov wrote:
 > Are you saying you are going to add a special case for each foo.o file
 > each time an accidental non-objdir build left foo.o in src? (and no,
 > that's not a rhetoric question).

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.

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)

and forget about make's builtin objdir hackery entirely. Unfortunately
there are many reasons why this is not a trivial undertaking...

David A. Holland

Reply via email to