diff options
author | Jiri Olsa <jolsa@kernel.org> | 2021-02-05 15:40:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-10 14:36:10 +0300 |
commit | eff1e04657279613854e0cf710f0ce0768f6021b (patch) | |
tree | 67b123cd28922df9a0484a02f0df7f58bcd6340b /tools/bpf | |
parent | f60c918b07b79b73501b12060ccac0ec2a291eb5 (diff) | |
download | linux-eff1e04657279613854e0cf710f0ce0768f6021b.tar.xz |
tools/resolve_btfids: Set srctree variable unconditionally
[ Upstream commit 7962cb9b640af98ccb577f46c8b894319e6c5c20 ]
We want this clean to be called from tree's root Makefile,
which defines same srctree variable and that will screw
the make setup.
We actually do not use srctree being passed from outside,
so we can solve this by setting current srctree value
directly.
Also changing the way how srctree is initialized as suggested
by Andrri.
Also root Makefile does not define the implicit RM variable,
so adding RM initialization.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210205124020.683286-4-jolsa@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/resolve_btfids/Makefile | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile index be09ec4f03ff..bb9fa8de7e62 100644 --- a/tools/bpf/resolve_btfids/Makefile +++ b/tools/bpf/resolve_btfids/Makefile @@ -2,11 +2,7 @@ include ../../scripts/Makefile.include include ../../scripts/Makefile.arch -ifeq ($(srctree),) -srctree := $(patsubst %/,%,$(dir $(CURDIR))) -srctree := $(patsubst %/,%,$(dir $(srctree))) -srctree := $(patsubst %/,%,$(dir $(srctree))) -endif +srctree := $(abspath $(CURDIR)/../../../) ifeq ($(V),1) Q = @@ -22,6 +18,7 @@ AR = $(HOSTAR) CC = $(HOSTCC) LD = $(HOSTLD) ARCH = $(HOSTARCH) +RM ?= rm OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/ |