2021-07-07 06:05:00

by Jianlin Lv

[permalink] [raw]
Subject: [PATCH bpf-next] bpf: runqslower: fixed make install issue

runqslower did not define install target, resulting in an installation
tool/bpf error:
$ make -C tools/bpf/ install

make[1]: Entering directory './tools/bpf/runqslower'
make[1]: *** No rule to make target 'install'. Stop.

Add install target for runqslower.

Signed-off-by: Jianlin Lv <[email protected]>
---
tools/bpf/runqslower/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
index 3818ec511fd2..7dd0ae982459 100644
--- a/tools/bpf/runqslower/Makefile
+++ b/tools/bpf/runqslower/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
include ../../scripts/Makefile.include

+prefix ?= /usr/local
+
OUTPUT ?= $(abspath .output)/

BPFTOOL_OUTPUT := $(OUTPUT)bpftool/
@@ -31,9 +33,11 @@ MAKEFLAGS += --no-print-directory
submake_extras := feature_display=0
endif

+INSTALL ?= install
+
.DELETE_ON_ERROR:

-.PHONY: all clean runqslower
+.PHONY: all clean runqslower install
all: runqslower

runqslower: $(OUTPUT)/runqslower
@@ -46,6 +50,11 @@ clean:
$(Q)$(RM) $(OUTPUT)runqslower
$(Q)$(RM) -r .output

+install: $(OUTPUT)/runqslower
+ $(call QUIET_INSTALL, runqslower)
+ $(Q)$(INSTALL) -m 0755 -d $(DESTDIR)$(prefix)/sbin
+ $(Q)$(INSTALL) $(OUTPUT)runqslower $(DESTDIR)$(prefix)/sbin/runqslower
+
$(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ)
$(QUIET_LINK)$(CC) $(CFLAGS) $^ -lelf -lz -o $@

--
2.25.1


2021-07-08 03:18:18

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: [PATCH bpf-next] bpf: runqslower: fixed make install issue

On Tue, Jul 6, 2021 at 11:03 PM Jianlin Lv <[email protected]> wrote:
>
> runqslower did not define install target, resulting in an installation
> tool/bpf error:
> $ make -C tools/bpf/ install
>
> make[1]: Entering directory './tools/bpf/runqslower'
> make[1]: *** No rule to make target 'install'. Stop.
>
> Add install target for runqslower.
>
> Signed-off-by: Jianlin Lv <[email protected]>

Andrii applied a patch that removed install target.
I don't mind whichever way.