[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange GNU make behavior with -include ?
From: |
Ted Stern |
Subject: |
Re: Strange GNU make behavior with -include ? |
Date: |
Wed, 04 Dec 2002 10:51:38 -0800 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (sparc-sun-solaris2.8) |
On Wed, 4 Dec 2002, Grégoire Sutre wrote:
>
> The following makefile goes through:
>
> ---------------------------------------
> all:
>
> dummy-fake:
>
> %.depend : %.c
> touch $@
>
> # Dependencies
>
> -include fake.depend
> ---------------------------------------
> localhost $ gmake
> make: Nothing to be done for `all'.
> ---------------------------------------
<snip>
> But this makefile doesn't go through:
>
> ---------------------------------------
> all:
>
> dummy-fake: fake.c
>
> %.depend : %.c
> touch $@
>
> # Dependencies
>
> -include fake.depend
> ---------------------------------------
> localhost $ gmake
> make: *** No rule to make target `fake.c', needed by `fake.depend'. Stop.
> ---------------------------------------
>
I tested this myself with 3.80. If you add
.INTERMEDIATE: fake.c
to the second example, it then has the same behavior as the first.
I'll let Paul explain why, as I would probably make a botch of it. ;-)
Ted
--
Ted Stern Engineering Applications
Cray Inc. http://www.cray.com
411 First Avenue South, Suite 600 206-701-2182
Seattle, WA 98104-2860 FAX: 206-701-2500
Debuggers' motto: Frango ut patefaciam -- I break in order to reveal