[PATCH] perf: makefile: add .DELETE_ON_ERROR special target

Changbin Du posted 1 patch 3 years, 3 months ago
tools/perf/Makefile.perf | 3 +++
1 file changed, 3 insertions(+)
[PATCH] perf: makefile: add .DELETE_ON_ERROR special target
Posted by Changbin Du 3 years, 3 months ago
As kbuild, this adds .DELETE_ON_ERROR special target to clean up
partially updated files on error. A known issue is the empty vmlinux.h
generted by bpftool if it failed to dump btf info.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
---
 tools/perf/Makefile.perf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 9b7886ce0674..13e7d26e77f0 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1151,3 +1151,6 @@ FORCE:
 .PHONY: archheaders
 
 endif # force_fixdep
+
+# Delete partially updated (corrupted) files on error
+.DELETE_ON_ERROR:
-- 
2.37.2
Re: [PATCH] perf: makefile: add .DELETE_ON_ERROR special target
Posted by Leo Yan 3 years, 3 months ago
On Sun, Dec 18, 2022 at 06:51:51AM +0800, Changbin Du wrote:
> As kbuild, this adds .DELETE_ON_ERROR special target to clean up
> partially updated files on error. A known issue is the empty vmlinux.h
> generted by bpftool if it failed to dump btf info.
> 
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Re: [PATCH] perf: makefile: add .DELETE_ON_ERROR special target
Posted by Arnaldo Carvalho de Melo 3 years, 3 months ago
Em Tue, Dec 20, 2022 at 09:57:57AM +0800, Leo Yan escreveu:
> On Sun, Dec 18, 2022 at 06:51:51AM +0800, Changbin Du wrote:
> > As kbuild, this adds .DELETE_ON_ERROR special target to clean up
> > partially updated files on error. A known issue is the empty vmlinux.h
> > generted by bpftool if it failed to dump btf info.
> > 
> > Signed-off-by: Changbin Du <changbin.du@gmail.com>
> > Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>

Thanks, applied.

- Arnaldo