mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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 <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Fixes: c819e2cf2e
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
1 parent
15c1247953
commit
75e84ab906
1 file changed
+4
-4
@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y))
|
||||
subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
|
||||
|
||||
# '$(OUTPUT)/dir' prefix to all objects
|
||||
prefix := $(subst ./,,$(OUTPUT)$(dir)/)
|
||||
obj-y := $(addprefix $(prefix),$(obj-y))
|
||||
subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
|
||||
objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
|
||||
obj-y := $(addprefix $(objprefix),$(obj-y))
|
||||
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
|
||||
|
||||
# Final '$(obj)-in.o' object
|
||||
in-target := $(prefix)$(obj)-in.o
|
||||
in-target := $(objprefix)$(obj)-in.o
|
||||
|
||||
PHONY += $(subdir-y)
|
||||
|
||||
|
||||
Reference in new issue
Block a user