> I think static pattern rules without recipes are rare (at least I've
> never seen or used one)
I could quickly lay my hands on what looks like a handful:
./subrules.make:384:$(SOFTWARE)$(PROJPATH)/%: %;
./subrules.make:392:$(FLEX_GEN_CPP): %.gen.cpp: generated/regenerated.%
./subrules.make:393
On Thu, 2025-06-05 at 21:43 +0200, Denis Excoffier wrote:
> jupiter% touch foo100.z0 bar200.z0; rm -f foo100.z1 bar200.z1
> jupiter% make
> foo100 (foo100 is expected and foo100 is obtained)
> 200 (bar200 is expected but 200 is obtained instead)
> jupiter% make --version | head -1
> GNU Make 4.4.1
Hello,
Order of static pattern rules is significant while IMHO it should not be.
Observe the following (below): the same rules are written in
reverse order for foo and bar, and the automatic variable $* has not the
same value in the two recipes:
jupiter% cat Makefile
OBJfoo := foo100.z1
OBJbar