coccinelle: extract dedicated make target to clean Coccinelle's results

Sometimes I want to remove only Coccinelle's results, but keep all other build artifacts left after my usual 'make all man' build. This new 'cocciclean' make target will allow just that. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

SZEDER Gábor committed Jul 23, 2018 at 15:51 UTC 1a96638e6963600c1b0e0880a3f175436c89a735
1 file changed +5 -3
Makefile
+5 -3
@@ -2906,7 +2906,10 @@ profile-clean:
2906 $(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
2907 $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
2908
2909 -clean: profile-clean coverage-clean
2909 +cocciclean:
2910 + $(RM) contrib/coccinelle/*.cocci.patch*
2911 +
2912 +clean: profile-clean coverage-clean cocciclean
2913 $(RM) *.res
2914 $(RM) $(OBJECTS)
2915 $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
@@ -2918,7 +2921,6 @@ clean: profile-clean coverage-clean
2921 $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
2922 $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
2923 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
2921 - $(RM) contrib/coccinelle/*.cocci.patch*
2924 $(MAKE) -C Documentation/ clean
2925 ifndef NO_PERL
2926 $(MAKE) -C gitweb clean
@@ -2934,7 +2936,7 @@ endif
2936 $(RM) GIT-USER-AGENT GIT-PREFIX
2937 $(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
2938
2937 -.PHONY: all install profile-clean clean strip
2939 +.PHONY: all install profile-clean cocciclean clean strip
2940 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
2941 .PHONY: FORCE cscope
2942