bug-make
[Top][All Lists]
Advanced

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

Re: problems with $(eval include...)


From: Fabio Alemagna
Subject: Re: problems with $(eval include...)
Date: Fri, 27 Jun 2003 00:53:16 +0200 (CEST)

On Thu, 26 Jun 2003, Ted Stern wrote:
> Hi Fabio,
>
> Use the "-" prefix with your include statements, it's much simpler:
>
>     -include $(DEPS)
>
> This will ignore the errors caused by a file not being found.
>
> More generally, you can make your dependency generation a lot simpler.  See
> Paul Smith's website for an essay about it:
>
>       http://make.paulandlesley.org/
>
> It's under the "Advanced Auto-dependency Generation" link.
>
> In a nutshell, you incorporate your dependency generation rule into the
> compilation rule.  Touched source files will be recompiled anyway, and
> untouched files with dependency information will be recompiled if necessary.

I know that, I've thought of it myself, but it just doesn't work for
autogenerated header files: say foo.o depends on foo.h, but foo.h is
autogenerated; now, make won't know about foo.h until next time it's
invoked, because the .d file doesn't exist the first time it's invoked,
and thus the foo.h rule won't be called until the 2nd time I run make,
which is really not what I want.

That $(eval) trick would be really useful... if it worked. There's
certainly a bug in make (hell, it segfaults, so something is going wrong
for sure), so it would be nice if it could be hunted and blasted :)

The other solution that I see would be for make to provide means  other
than timestamps to check whether a target needs to be rebuilt.

Fabio Alemagna





reply via email to

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