[PATCH] perf build: fix out of tree build

Ethan Adams posted 1 patch 1 year, 10 months ago
tools/perf/Makefile.perf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[PATCH] perf build: fix out of tree build
Posted by Ethan Adams 1 year, 10 months ago
It seems that a previous modification to sysreg-defs, which corrected
emitting the headaer to the specified output directory, exposed missing
subdir, prefix variables. This breaks out of tree builds of perf as the
file is now built into the output directory, but still tries to descend
into output directory as a subdir.

Fixes: a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")
Tested-by: Tycho Andersen <tycho@tycho.pizza>
Reviewed-by: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Ethan Adams <j.ethan.adams@gmail.com>
---
 tools/perf/Makefile.perf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 058c9aecf608..63a8b4be5075 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -436,18 +436,19 @@ SHELL = $(SHELL_PATH)
 
 arm64_gen_sysreg_dir := $(srctree)/tools/arch/arm64/tools
 ifneq ($(OUTPUT),)
-  arm64_gen_sysreg_outdir := $(OUTPUT)
+  arm64_gen_sysreg_outdir := $(abspath $(OUTPUT))
 else
   arm64_gen_sysreg_outdir := $(CURDIR)
 endif
 
 arm64-sysreg-defs: FORCE
-	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir)
+	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
+		prefix= subdir=
 
 arm64-sysreg-defs-clean:
 	$(call QUIET_CLEAN,arm64-sysreg-defs)
 	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
-		clean > /dev/null
+		prefix= subdir= clean > /dev/null
 
 beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
 linux_uapi_dir := $(srctree)/tools/include/uapi/linux

base-commit: e365762bb26770b53d2475852453bed76c0d85f9
-- 
2.43.2
Re: [PATCH] perf build: fix out of tree build
Posted by Oliver Upton 1 year, 10 months ago
On Thu, Mar 14, 2024 at 03:20:12PM -0700, Ethan Adams wrote:
> It seems that a previous modification to sysreg-defs, which corrected
> emitting the headaer to the specified output directory, exposed missing

typo: header

> subdir, prefix variables. This breaks out of tree builds of perf as the
> file is now built into the output directory, but still tries to descend
> into output directory as a subdir.
> 
> Fixes: a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")
> Tested-by: Tycho Andersen <tycho@tycho.pizza>
> Reviewed-by: Tycho Andersen <tycho@tycho.pizza>
> Signed-off-by: Ethan Adams <j.ethan.adams@gmail.com>

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>

-- 
Thanks,
Oliver
Re: [PATCH] perf build: fix out of tree build
Posted by Arnaldo Carvalho de Melo 1 year, 10 months ago
On Mon, Mar 18, 2024 at 05:24:56PM +0000, Oliver Upton wrote:
> On Thu, Mar 14, 2024 at 03:20:12PM -0700, Ethan Adams wrote:
> > It seems that a previous modification to sysreg-defs, which corrected
> > emitting the headaer to the specified output directory, exposed missing
> 
> typo: header

fixed
 
> > subdir, prefix variables. This breaks out of tree builds of perf as the
> > file is now built into the output directory, but still tries to descend
> > into output directory as a subdir.
> > 
> > Fixes: a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")
> > Tested-by: Tycho Andersen <tycho@tycho.pizza>
> > Reviewed-by: Tycho Andersen <tycho@tycho.pizza>
> > Signed-off-by: Ethan Adams <j.ethan.adams@gmail.com>
> 
> Reviewed-by: Oliver Upton <oliver.upton@linux.dev>

Thanks, applied to perf-tools-next,

- Arnaldo