diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-04-25 20:52:12 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-04-25 20:59:36 +0200 |
commit | a28ddbed959edd5600619a89d79c16e26566cada (patch) | |
tree | a81e2aab8ba850f910830c91d469b45b540fa640 /Makefile | |
parent | 000632bfafe4f1abb4ddcc6864033fa1831a68d7 (diff) |
*.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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -38,8 +38,7 @@ MAKEFILEDIR := $(DATAROOTDIR)/mk .PHONY: all -all: build - @: +all: build; .PHONY: help help: |