[Top][All Lists]

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

Re: -include filename does not show correct dependency errors

From: Philip Guenther
Subject: Re: -include filename does not show correct dependency errors
Date: Tue, 27 Jan 2009 22:23:12 -0800

On Tue, Jan 27, 2009 at 9:44 PM, willard <address@hidden> wrote:
> this is my example (create the foo.d manually as below)

Well, now that you've shown your whole Makefile, I have a guess as to
why make is behaving as it is.  It's tied that the face that you use
foo.d both as an implicit target (by virtue of being an included
makefile) and as an explicit target, as a dependency of 'all'.  My
guess is that when make first tries to build foo.d and fails, it marks
foo.d as unbuildable, but not why.  Later, when you have it try to
build foo.d (again), it sees that it has already marked it as failed,
so gives up directly.

My advice is to avoid this by fixing your auto-dependency method.  If
you just build the *.d files concurrently with the *.o files, then you
could avoid naming foo.d as either dependency or target.  The details
of why that works correctly and how to actually do that concurrent
building can be found in the "Advanced Auto-Dependencies" section of

Yeah, make should give a less misleading error message, but why spend
time banging your head on a bug that could be avoided by making your
own code less wasteful?

Philip Guenther

reply via email to

[Prev in Thread] Current Thread [Next in Thread]