> On Feb 4, 2021, at 1:18 PM, Jiri Olsa <jo...@kernel.org> wrote:
>
> 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 root Makefile does not define the implicit RM variable,
> so adding RM initialization.
>
> Signed-off-by: Jiri Olsa <jo...@kernel.org>
Acked-by: Song Liu <songliubrav...@fb.com>
> ---
> tools/bpf/resolve_btfids/Makefile | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/bpf/resolve_btfids/Makefile
> b/tools/bpf/resolve_btfids/Makefile
> index 3007cfabf5e6..b41fc9a81e83 100644
> --- a/tools/bpf/resolve_btfids/Makefile
> +++ b/tools/bpf/resolve_btfids/Makefile
> @@ -2,11 +2,9 @@
> include ../../scripts/Makefile.include
> include ../../scripts/Makefile.arch
>
> -ifeq ($(srctree),)
> srctree := $(patsubst %/,%,$(dir $(CURDIR)))
> srctree := $(patsubst %/,%,$(dir $(srctree)))
> srctree := $(patsubst %/,%,$(dir $(srctree)))
> -endif
>
> ifeq ($(V),1)
> Q =
> @@ -22,6 +20,7 @@ AR = $(HOSTAR)
> CC = $(HOSTCC)
> LD = $(HOSTLD)
> ARCH = $(HOSTARCH)
> +RM ?= rm
>
> OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/
>
> --
> 2.26.2
>