Skip to content

Commit 5349910

Browse files
andy-shevLinus Walleij
authored andcommitted
tools/gpio: add install section
Allow user to call install target. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 8674cea commit 5349910

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎tools/Makefile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ tmon: FORCE
8585
freefall: FORCE
8686
$(call descend,laptop/$@)
8787

88-
all: acpi cgroup cpupower hv firewire lguest \
88+
all: acpi cgroup cpupower gpio hv firewire lguest \
8989
perf selftests turbostat usb \
9090
virtio vm net x86_energy_perf_policy \
9191
tmon freefall objtool
@@ -96,7 +96,7 @@ acpi_install:
9696
cpupower_install:
9797
$(call descend,power/$(@:_install=),install)
9898

99-
cgroup_install firewire_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
99+
cgroup_install firewire_install gpio_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
100100
$(call descend,$(@:_install=),install)
101101

102102
selftests_install:
@@ -114,7 +114,8 @@ freefall_install:
114114
kvm_stat_install:
115115
$(call descend,kvm/$(@:_install=),install)
116116

117-
install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \
117+
install: acpi_install cgroup_install cpupower_install gpio_install \
118+
hv_install firewire_install lguest_install \
118119
perf_install selftests_install turbostat_install usb_install \
119120
virtio_install vm_install net_install x86_energy_perf_policy_install \
120121
tmon_install freefall_install objtool_install kvm_stat_install

‎tools/gpio/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 $(shell pwd)))
57
srctree := $(patsubst %/,%,$(dir $(srctree)))
@@ -62,6 +64,12 @@ clean:
6264
rm -f $(OUTPUT)include/linux/gpio.h
6365
find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
6466

67+
install: $(ALL_PROGRAMS)
68+
install -d -m 755 $(DESTDIR)$(bindir); \
69+
for program in $(ALL_PROGRAMS); do \
70+
install $$program $(DESTDIR)$(bindir); \
71+
done
72+
6573
FORCE:
6674

67-
.PHONY: all clean FORCE prepare
75+
.PHONY: all install clean FORCE prepare

0 commit comments

Comments
 (0)