Skip to content

Commit

Permalink
tools/resolve_btfids: Set srctree variable unconditionally
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
olsajiri authored and anakryiko committed Feb 9, 2021
1 parent f231309 commit 7962cb9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/bpf/resolve_btfids/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -22,6 +18,7 @@ AR = $(HOSTAR)
CC = $(HOSTCC)
LD = $(HOSTLD)
ARCH = $(HOSTARCH)
RM ?= rm

OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/

Expand Down

0 comments on commit 7962cb9

Please sign in to comment.