]> granicus.if.org Git - git/commitdiff
coccinelle: use $(addsuffix) in 'coccicheck' make target
authorSZEDER Gábor <szeder.dev@gmail.com>
Mon, 23 Jul 2018 13:50:57 +0000 (15:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jul 2018 19:37:28 +0000 (12:37 -0700)
The dependencies of the 'coccicheck' make target are listed with the
help of the $(patsubst) make function, which in this case doesn't do
any pattern substitution, but only adds the '.patch' suffix.

Use the shorter and more idiomatic $(addsuffix) make function instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile

index 530be4eca67bbe6f6dfd1d3e649cccaf67a6744d..5c679882f2ce551eabd478907ced459b5d8d210c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2686,7 +2686,7 @@ C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
        then \
                echo '    ' SPATCH result: $@; \
        fi
-coccicheck: $(patsubst %.cocci,%.cocci.patch,$(wildcard contrib/coccinelle/*.cocci))
+coccicheck: $(addsuffix .patch,$(wildcard contrib/coccinelle/*.cocci))
 
 .PHONY: coccicheck