Re: Order-only prerequisites

2023-06-06 Thread Frank Heckenbach
Henrik Carlqvist wrote: > > Consider this makefile: > > > > .PHONY: a b > > a:; @echo a > > b:; @echo b > > b: | a > > Your problem with this Makefile is that it never creates any files a or b. That's why I made them phony. But that was just for demonstration. I get the same effects with this m

Re: Order-only prerequisites

2023-06-06 Thread Henrik Carlqvist
> Consider this makefile: > > .PHONY: a b > a:; @echo a > b:; @echo b > b: | a Your problem with this Makefile is that it never creates any files a or b. This means that your order only prerequisite on a allways has to be made. > % make b a > a > b > make: Nothing to be done for 'a'. > > Correc

Order-only prerequisites

2023-06-06 Thread Frank Heckenbach
GNU Make 4.4.1 Consider this makefile: .PHONY: a b a:; @echo a b:; @echo b b: | a What I want to achieve is that a and b can be made independently, but when both of them are made, a is always made first. I assumed that's what order-only prerequisites are for, but they don't seem to work like thi