[PATCH v1 03/22] Makefile: also remove .gcno files when cleaning

Alex Bennée posted 22 patches 4 years ago
There is a newer version of this series
[PATCH v1 03/22] Makefile: also remove .gcno files when cleaning
Posted by Alex Bennée 4 years ago
Left over .gcno files from old builds can really confuse gcov and the
user expects a clean slate after "make clean". Make clean mean clean.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index db9a788601..65e0d2dd4e 100644
--- a/Makefile
+++ b/Makefile
@@ -206,7 +206,8 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
 clean: recurse-clean
 	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
 	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
-	find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
+	find . \( -name '*.so' -o -name '*.dll' -o \
+	 	  -name '*.[oda]' -o -name '*.gcno' \) -type f \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
 		-exec rm {} +
-- 
2.30.2


Re: [PATCH v1 03/22] Makefile: also remove .gcno files when cleaning
Posted by Thomas Huth 4 years ago
On 24/01/2022 21.15, Alex Bennée wrote:
> Left over .gcno files from old builds can really confuse gcov and the
> user expects a clean slate after "make clean". Make clean mean clean.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   Makefile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index db9a788601..65e0d2dd4e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -206,7 +206,8 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
>   clean: recurse-clean
>   	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
>   	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
> -	find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
> +	find . \( -name '*.so' -o -name '*.dll' -o \
> +	 	  -name '*.[oda]' -o -name '*.gcno' \) -type f \

My git complains here:

.git/rebase-apply/patch:15: space before tab in indent.
	 	  -name '*.[oda]' -o -name '*.gcno' \) -type f \
warning: 1 line adds whitespace errors.

Please remove the space before the tab.

  Thomas