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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <Jianlin.Lv@xxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux