By using a lot of PHONY targets, I think you're closing a door to one make 
greatest feature : not redoing those things that are already up to date.

If you consider that every rule can generate a useful file (file containing 
container image for example) or a dummy file, you can benefit from the date 
comparison between it and its pre-requisites and diminish greatly the need for 
PHONY targets. In my opinion, PHONY targets should just be used for comfort of 
the user launching make, and those targets have simply a dependency to a real 
file.

Le 10 août 2022 21:08:55 GMT+02:00, Katherine Pata <m...@kitty.sh> a écrit :
>I often find myself using makefiles to handle things like project linting, 
>container images, various scripts, initiating tests, and other misc tasks. 
>Sometimes these include tasks that have real dependencies that make should 
>keep track of, but often the vast majority of targets are phony.
>
>Something like --reverse-phony or a variable like .GENUINE or .REAL that is 
>mutually exclusive with .PHONY would be really helpful.
>
>Would there be interest in developing this for GNU Make? If someone creates a 
>patch, would this be accepted?
>
>Has this been discussed before?

Reply via email to