bug-make
[Top][All Lists]
Advanced

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

Re: Making makefiles with primarily phony targets more friendly


From: Britton Kerin
Subject: Re: Making makefiles with primarily phony targets more friendly
Date: Wed, 10 Aug 2022 12:48:37 -0800

On Wed, Aug 10, 2022 at 12:33 PM Jean-Baptiste Poittevin
<jb.poittevin@gmail.com> wrote:
>
> 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.

It's true that some phony targets can ultimately be integrated into
the DAG, but it's safe to assume most users are aware of this and have
some reason for preferring to keep small scripts in the Makefile
itself (where they have easy access to make variables).

Britton



reply via email to

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