]> git.ipfire.org Git - thirdparty/man-pages.git/commit
*.mk: Use empty recipes for .PHONY targets
authorAlejandro Colomar <alx@kernel.org>
Tue, 25 Apr 2023 18:52:12 +0000 (20:52 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 25 Apr 2023 18:59:36 +0000 (20:59 +0200)
commita28ddbed959edd5600619a89d79c16e26566cada
treea81e2aab8ba850f910830c91d469b45b540fa640
parent000632bfafe4f1abb4ddcc6864033fa1831a68d7
*.mk: Use empty recipes for .PHONY targets

The @: dummy recipe was there to avoid having rules without recipes.
Rules without recipes can be confusing, as the reader can't know if a
recipe is being defined somewhere else.  Also, implicit rules might
apply (in general, but we disable all implicit stuff).

However, @: is also problematic, since make really needs to run that
command, which is unnecessary overhead.  But okay, :(1) (really called
true(1), but wouldn't it be a nice man page name?) that's not meaningful
overhead.

And the bigger problem: having a recipe hides the usual:

make: Nothing to be done for 'all'.

We already disable it by using .SILENCE:, but the message can be seen
when using V=1 (after this patch; prior to this patch, it was impossible
to find that message).  It is good to be able to know that make(1)
says there's nothing to be done, as a confirmation.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 files changed:
Makefile
share/mk/build/_.mk
share/mk/build/catman.mk
share/mk/build/html.mk
share/mk/build/pdf.mk
share/mk/build/pre.mk
share/mk/build/ps.mk
share/mk/build/src.mk
share/mk/check/_.mk
share/mk/check/catman.mk
share/mk/dist.mk
share/mk/install/_.mk
share/mk/install/html.mk
share/mk/install/man.mk
share/mk/lint/_.mk
share/mk/lint/c.mk
share/mk/lint/man/man.mk
share/mk/lint/man/mdoc.mk