D1167: makefile: add target to apply clang-format in-place

Anton Shestakov av6 at dwimlabs.net
Fri Oct 27 09:36:56 EDT 2017


On Thu, 26 Oct 2017 21:14:27 -0400
"Matt Harbison" <mharbison72 at gmail.com> wrote:

> On Wed, 25 Oct 2017 23:42:04 -0400, av6 (Anton Shestakov)  
> <phabricator at mercurial-scm.org> wrote:
> 
> > av6 added a comment.
> >
> >
> >   I'm a bit late to the party, but wanted to remind people that targets  
> > that are not actual files (in this case, a file named "format-c") should  
> > also go into .PHONY list. Nothing bad will happen right now (unless such  
> > file appears at some point), but adding it to "phony" targets helps  
> > keeping makefile in proper shape. (Looking at the already unwieldy  
> > .PHONY list I wish Make had another way to mark targets "phony").  
> 
> Split up the .PHONY declaration and put it in front of each target, so  
> it's more obvious when one is missing?
> 
> https://unix.stackexchange.com/questions/217295/phony-all-rules-in-gnu-make-file

It's not really fit for stable, being a refactoring and all, but I did
this: https://bitbucket.org/av6/hg-wip/commits/4c710586c899b8c

Looks better, maybe? What about non-GNU make alternatives, does BSD
make support this, do we care?

It does indeed make phony targets missing a declaration a lot more
obvious, for example 3 wheels-related ones, I think they also are
actually phony.


More information about the Mercurial-devel mailing list