* [PATCH 1/1] tools/hv: add install target to Makefile
@ 2017-11-14 20:15 kys
0 siblings, 0 replies; only message in thread
From: kys @ 2017-11-14 20:15 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
leann.ogasawara, marcelo.cerri, sthemmin
Cc: K. Y. Srinivasan
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Makefiles usually come with 'install' target included so each distro
doesn't need to implement the procedure from scratch. Add it to tools/hv.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
tools/hv/Makefile | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/tools/hv/Makefile b/tools/hv/Makefile
index 0d1e61b..e8f0a0a 100644
--- a/tools/hv/Makefile
+++ b/tools/hv/Makefile
@@ -6,9 +6,30 @@ CFLAGS = $(WARNINGS) -g $(shell getconf LFS_CFLAGS)
CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include
-all: hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
+sbindir ?= /usr/sbin
+libexecdir ?= /usr/libexec
+sharedstatedir ?= /var/lib
+
+ALL_PROGRAMS := hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
+
+ALL_SCRIPTS := hv_get_dhcp_info.sh hv_get_dns_info.sh hv_set_ifconfig.sh
+
+all: $(ALL_PROGRAMS)
+
%: %.c
$(CC) $(CFLAGS) -o $@ $^
clean:
$(RM) hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
+
+install: all
+ install -d -m 755 $(DESTDIR)$(sbindir); \
+ install -d -m 755 $(DESTDIR)$(libexecdir)/hypervkvpd; \
+ install -d -m 755 $(DESTDIR)$(sharedstatedir); \
+ for program in $(ALL_PROGRAMS); do \
+ install $$program -m 755 $(DESTDIR)$(sbindir); \
+ done; \
+ install -m 755 lsvmbus $(DESTDIR)$(sbindir); \
+ for script in $(ALL_SCRIPTS); do \
+ install $$script -m 755 $(DESTDIR)$(libexecdir)/hypervkvpd/$${script%.sh}; \
+ done
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-14 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 20:15 [PATCH 1/1] tools/hv: add install target to Makefile kys
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome