[Top][All Lists]

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

Re: Finding second route through rules

From: Steven Simpson
Subject: Re: Finding second route through rules
Date: Wed, 20 Jan 2016 18:08:29 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1


Did this slip under the radar?


On 09/12/15 17:25, Steven Simpson wrote:
Just noticed a change in behaviour between 3.81 and 4.1:
    @echo from bar %.baz
    @echo from baz

%.baz: %.qux
    @echo from qux %.quux
    @echo from quux


So there is a route from a.quux -> ->, and from a.qux -> a.baz -> The first is preferred, as implied by the ordering of the first two rules, AIUI.

Create a.qux, and ensure no other a.* files exist, so the second route ought to be chosen. Then [make].

$ ls
a.qux  Makefile
$ make
from qux
from baz
$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

This program built for x86_64-pc-linux-gnu

So Make has chosen the second route, because the first is incomplete.

$ ls
a.qux  Makefile
$ make
make: *** No rule to make target '', needed by ''. Stop.
$ make -v
GNU Make 4.1
Built for x86_64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later<>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

It seems that Make 4.1 is fixated on the first route, just because the intermediate step is mentioned as a prerequisite. Disable the gwonk line, and it's fine again.

Just tried on the latest in git, and it is there too.

Is this intended?

reply via email to

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