bug-make
[Top][All Lists]
Advanced

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

Re: incorrect error message


From: Boris Kolpackov
Subject: Re: incorrect error message
Date: Thu, 16 Sep 2004 17:02:44 +0000 (UTC)
User-agent: nn/6.6.5+RFC1522

Bruno Haible <address@hidden> writes:

> To reproduce: In an otherwise empty directory, create this Makefile:
> 
> ====================================
> %.erg : ../bar
>       echo done
> 
> %.erw : ../baz
>       echo done
> 
> foo.res : ../baz
>       echo done
> ====================================
> 
> $ make foo.erg
> make: *** No rule to make target `foo.erg'.  Stop.
> $ make foo.erw
> make: *** No rule to make target `../baz', needed by `foo.erw'.  Stop.
> $ make foo.res
> make: *** No rule to make target `../baz', needed by `foo.res'.  Stop.
> 
> The first error message is incorrect and should look like the other two:
> make: *** No rule to make target `../bar', needed by `foo.erg'.  Stop.

Actually the second error message is incorrect and should look like the
first ;-). In fact it is a side effect of a bug which is more serious
than just incorrect diagnostic. Consider the following makefile

test.foo:

%.foo : baz
        echo done

%.foo : bar
        echo done

fox: baz

Also assume that there is a file `baz' in current directory. When you
run make on this makefile (3.80 or current cvs) you get

make: *** No rule to make target `baz', needed by `test.foo'.  Stop.

This is wrong since the second pattern rule, if tried, would succeed.
The bug is in implicit.c line 399. I have a patch which will appear
in make-bk6 patch-set. I can also submit a patch against make-cvs if
there is any interest.

-boris





reply via email to

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