Skip to content

Commit 75e84ab

Browse files
l1kacmel
authored andcommitted
perf tools: Fix build breakage if prefix= is specified
Invoking Makefile.perf with prefix= breaks the build since Makefile.perf hands that variable down to Makefile.build where it overrides prefix := $(subst ./,,$(OUTPUT)$(dir)/) leading to errors like this: No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o' Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Fixes: c819e2c Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@mx.google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 15c1247 commit 75e84ab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tools/build/Makefile.build‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y))
9494
subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
9595

9696
# '$(OUTPUT)/dir' prefix to all objects
97-
prefix := $(subst ./,,$(OUTPUT)$(dir)/)
98-
obj-y := $(addprefix $(prefix),$(obj-y))
99-
subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
97+
objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
98+
obj-y := $(addprefix $(objprefix),$(obj-y))
99+
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
100100

101101
# Final '$(obj)-in.o' object
102-
in-target := $(prefix)$(obj)-in.o
102+
in-target := $(objprefix)$(obj)-in.o
103103

104104
PHONY += $(subdir-y)
105105

0 commit comments

Comments
 (0)