On Tue, 2022-07-19 at 20:26 +0200, Jean-Baptiste Poittevin wrote: > a% b%: % > cp $< $@
This rule is not well-formed. By declaring two patterns as targets, you are telling make that your recipe will build both targets after successfully being invoked one time. If your recipe doesn't actually do that, there's not much make can do about it, and you'll get unexpected behavior such as what you saw. See https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html at the bottom, which references https://www.gnu.org/software/make/manual/html_node/Multiple-Targets.html