* [PATCH] Makefile: respect $(V) in %.cocci.patch target
@ 2019-10-09 20:43 Denton Liu
2019-10-10 12:00 ` Johannes Schindelin
0 siblings, 1 reply; 2+ messages in thread
From: Denton Liu @ 2019-10-09 20:43 UTC (permalink / raw)
To: Git Mailing List; +Cc: René Scharfe
When the %.cocci.patch target was defined in 63f0a758a0 (add coccicheck
make target, 2016-09-15), it included a mechanism to suppress the noisy
output, similar to the $(QUIET_<x>) family of variables.
In the case where one wants to inspect the output hidden by
$(QUIET_<x>), one could define $(V) for verbose output. In the
%.cocci.patch target, this was not implemented.
Move the output suppression into the $(QUIET_SPATCH) variable which is
used like the other $(QUIET_<x>) variables. While we're at it, change
the number of spaces printed from 5 to 4, like the other variables
there.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c99361e719..ae45bfc429 100644
--- a/Makefile
+++ b/Makefile
@@ -1890,6 +1890,7 @@ ifndef V
QUIET_SP = @echo ' ' SP $<;
QUIET_HDR = @echo ' ' HDR $(<:hcc=h);
QUIET_RC = @echo ' ' RC $@;
+ QUIET_SPATCH = @echo ' ' SPATCH $<;
QUIET_SUBDIR0 = +@subdir=
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
$(MAKE) $(PRINT_DIR) -C $$subdir
@@ -2818,7 +2819,7 @@ FOUND_C_SOURCES = $(filter %.c,$(shell $(FIND_SOURCE_FILES)))
COCCI_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES))
%.cocci.patch: %.cocci $(COCCI_SOURCES)
- @echo ' ' SPATCH $<; \
+ $(QUIET_SPATCH) \
if test $(SPATCH_BATCH_SIZE) = 0; then \
limit=; \
else \
--
2.23.0.746.g72fc0fc0b9
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: respect $(V) in %.cocci.patch target
2019-10-09 20:43 [PATCH] Makefile: respect $(V) in %.cocci.patch target Denton Liu
@ 2019-10-10 12:00 ` Johannes Schindelin
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2019-10-10 12:00 UTC (permalink / raw)
To: Denton Liu; +Cc: Git Mailing List, René Scharfe
Hi Denton,
On Wed, 9 Oct 2019, Denton Liu wrote:
> When the %.cocci.patch target was defined in 63f0a758a0 (add coccicheck
> make target, 2016-09-15), it included a mechanism to suppress the noisy
> output, similar to the $(QUIET_<x>) family of variables.
>
> In the case where one wants to inspect the output hidden by
> $(QUIET_<x>), one could define $(V) for verbose output. In the
> %.cocci.patch target, this was not implemented.
>
> Move the output suppression into the $(QUIET_SPATCH) variable which is
> used like the other $(QUIET_<x>) variables. While we're at it, change
> the number of spaces printed from 5 to 4, like the other variables
> there.
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
Looks obviously correct to me.
Thanks,
Dscho
> Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index c99361e719..ae45bfc429 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1890,6 +1890,7 @@ ifndef V
> QUIET_SP = @echo ' ' SP $<;
> QUIET_HDR = @echo ' ' HDR $(<:hcc=h);
> QUIET_RC = @echo ' ' RC $@;
> + QUIET_SPATCH = @echo ' ' SPATCH $<;
> QUIET_SUBDIR0 = +@subdir=
> QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
> $(MAKE) $(PRINT_DIR) -C $$subdir
> @@ -2818,7 +2819,7 @@ FOUND_C_SOURCES = $(filter %.c,$(shell $(FIND_SOURCE_FILES)))
> COCCI_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES))
>
> %.cocci.patch: %.cocci $(COCCI_SOURCES)
> - @echo ' ' SPATCH $<; \
> + $(QUIET_SPATCH) \
> if test $(SPATCH_BATCH_SIZE) = 0; then \
> limit=; \
> else \
> --
> 2.23.0.746.g72fc0fc0b9
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-10 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 20:43 [PATCH] Makefile: respect $(V) in %.cocci.patch target Denton Liu
2019-10-10 12:00 ` Johannes Schindelin
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).