Thread (14 messages) flat view 14 messages, 4 authors, 2021-02-05

Re: [PATCH bpf-next 3/4] tools/resolve_btfids: Set srctree variable unconditionally

From: Andrii Nakryiko <hidden>
Date: 2021-02-05 01:25:43
Also in: bpf, linux-kbuild

Possibly related (same subject, not in this thread)

On Thu, Feb 4, 2021 at 1:21 PM Jiri Olsa [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 <jolsa@kernel.org>
---
 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)))
Is this just a weird way of doing $(abspath $(CURDIR)/../../../)? Are
there any advantages compared to a more straightforward way?
quoted hunk ↗ jump to hunk
-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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help