I would like to create a Makefile with multiple ways to produce a file:
.PHONY: app bin tgt
app file: app-dependency ; touch file
bin file: bin-dependency ; touch file
tgt: file ; touch tgt
Such that I could run make tgt and depending on whether the file app-dependency or bin-dependency was present would decide which to targets to run.
When I write something like the above, I get the following warnings:
warning: overriding recipe for target 'file'
warning: ignoring old recipe for target 'file'