Skip to content

Commit e9d4650

Browse files
andy-shevbroonie
authored andcommitted
spi: tools: add install section
Allow user to call install target. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent f325b73 commit e9d4650

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tools/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ kvm_stat: FORCE
9191
$(call descend,kvm/$@)
9292

9393
all: acpi cgroup cpupower gpio hv firewire lguest liblockdep \
94-
perf selftests turbostat usb \
94+
perf selftests spi turbostat usb \
9595
virtio vm net x86_energy_perf_policy \
9696
tmon freefall objtool kvm_stat
9797

@@ -101,7 +101,7 @@ acpi_install:
101101
cpupower_install:
102102
$(call descend,power/$(@:_install=),install)
103103

104-
cgroup_install firewire_install gpio_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
104+
cgroup_install firewire_install gpio_install hv_install lguest_install perf_install spi_install usb_install virtio_install vm_install net_install objtool_install:
105105
$(call descend,$(@:_install=),install)
106106

107107
liblockdep_install:

tools/spi/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
include ../scripts/Makefile.include
22

3+
bindir ?= /usr/bin
4+
35
ifeq ($(srctree),)
46
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
57
srctree := $(patsubst %/,%,$(dir $(srctree)))
@@ -53,6 +55,12 @@ clean:
5355
rm -f $(OUTPUT)include/linux/spi/spidev.h
5456
find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
5557

58+
install: $(ALL_PROGRAMS)
59+
install -d -m 755 $(DESTDIR)$(bindir); \
60+
for program in $(ALL_PROGRAMS); do \
61+
install $$program $(DESTDIR)$(bindir); \
62+
done
63+
5664
FORCE:
5765

58-
.PHONY: all clean FORCE prepare
66+
.PHONY: all install clean FORCE prepare

0 commit comments

Comments
 (0)