[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making makefiles with primarily phony targets more friendly

From: Jean-Baptiste Poittevin
Subject: Re: Making makefiles with primarily phony targets more friendly
Date: Wed, 10 Aug 2022 22:19:04 +0200
User-agent: K-9 Mail for Android

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 <me@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

[Prev in Thread] Current Thread [Next in Thread]