2021-03-02 08:23:17

by Gonsolo

[permalink] [raw]
Subject: [PATCH] Perf: Clean generated directory.

From: Andreas Wendleder <[email protected]>

Remove generated directory tools/perf/arch/x86/include/generated.

Signed-off-by: Andreas Wendleder <[email protected]>
---
tools/perf/arch/x86/Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile
index 8cc6642fce7a..5a9f9a7bf07d 100644
--- a/tools/perf/arch/x86/Makefile
+++ b/tools/perf/arch/x86/Makefile
@@ -10,10 +10,11 @@ PERF_HAVE_JITDUMP := 1
# Syscall table generation
#

-out := $(OUTPUT)arch/x86/include/generated/asm
-header := $(out)/syscalls_64.c
-sys := $(srctree)/tools/perf/arch/x86/entry/syscalls
-systbl := $(sys)/syscalltbl.sh
+generated := $(OUTPUT)arch/x86/include/generated
+out := $(generated)/asm
+header := $(out)/syscalls_64.c
+sys := $(srctree)/tools/perf/arch/x86/entry/syscalls
+systbl := $(sys)/syscalltbl.sh

# Create output directory if not already present
_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
@@ -22,6 +23,6 @@ $(header): $(sys)/syscall_64.tbl $(systbl)
$(Q)$(SHELL) '$(systbl)' $(sys)/syscall_64.tbl 'x86_64' > $@

clean::
- $(call QUIET_CLEAN, x86) $(RM) $(header)
+ $(call QUIET_CLEAN, x86) $(RM) -r $(header) $(generated)

archheaders: $(header)
--
2.27.0


2021-03-04 06:21:23

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] Perf: Clean generated directory.

Em Mon, Mar 01, 2021 at 07:56:42PM +0100, Gon Solo escreveu:
> From: Andreas Wendleder <[email protected]>
>
> Remove generated directory tools/perf/arch/x86/include/generated.

Thanks applied.

There is one more, consider fixing it too:

$ make -C tools/perf clean
make: Entering directory '/home/acme/git/perf/tools/perf'
CLEAN x86
CLEAN libtraceevent
CLEAN libapi
CLEAN libbpf
CLEAN libsubcmd
CLEAN libperf
CLEAN fixdep
CLEAN feature-detect
CLEAN python
CLEAN bpf-skel
CLEAN core-objs
CLEAN core-progs
CLEAN core-gen
CLEAN Documentation
make: Leaving directory '/home/acme/git/perf/tools/perf'
$ find tools/perf -name generated
tools/perf/trace/beauty/generated
$

- Arnaldo

> Signed-off-by: Andreas Wendleder <[email protected]>
> ---
> tools/perf/arch/x86/Makefile | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile
> index 8cc6642fce7a..5a9f9a7bf07d 100644
> --- a/tools/perf/arch/x86/Makefile
> +++ b/tools/perf/arch/x86/Makefile
> @@ -10,10 +10,11 @@ PERF_HAVE_JITDUMP := 1
> # Syscall table generation
> #
>
> -out := $(OUTPUT)arch/x86/include/generated/asm
> -header := $(out)/syscalls_64.c
> -sys := $(srctree)/tools/perf/arch/x86/entry/syscalls
> -systbl := $(sys)/syscalltbl.sh
> +generated := $(OUTPUT)arch/x86/include/generated
> +out := $(generated)/asm
> +header := $(out)/syscalls_64.c
> +sys := $(srctree)/tools/perf/arch/x86/entry/syscalls
> +systbl := $(sys)/syscalltbl.sh
>
> # Create output directory if not already present
> _dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
> @@ -22,6 +23,6 @@ $(header): $(sys)/syscall_64.tbl $(systbl)
> $(Q)$(SHELL) '$(systbl)' $(sys)/syscall_64.tbl 'x86_64' > $@
>
> clean::
> - $(call QUIET_CLEAN, x86) $(RM) $(header)
> + $(call QUIET_CLEAN, x86) $(RM) -r $(header) $(generated)
>
> archheaders: $(header)
> --
> 2.27.0
>

--

- Arnaldo