Add hierarchy-file support to the DPDK app files,
when invoking "make install H=1" (hierarchy-file)

This hierarchy is based on:
http://www.freedesktop.org/software/systemd/man/file-hierarchy.html

app files will be installed in: $(DESTDIR)/usr/bin

Signed-off-by: Mario Carrillo <mario.alfredo.c.arevalo at intel.com>
---
 mk/rte.app.mk        | 8 ++++++++
 mk/rte.sdkinstall.mk | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 9e1909e..ae3328c 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -155,6 +155,14 @@ LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)

 .PHONY: all
 all: install
+#
+# if H (hierarchy-file) varible is equal "1"
+# install app in /usr/bin/ too.
+#
+ifeq ($(H),1)
+       @[ -d $(BIN_DIR) ] || mkdir -p $(BIN_DIR)
+       $(Q)cp -f $(RTE_OUTPUT)/app/$(APP) $(BIN_DIR)
+endif

 .PHONY: install
 install: build _postinstall
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 41b8485..723fd97 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -58,8 +58,10 @@ T := 
$(RTE_ARCH)-$(RTE_MACHINE)-$(RTE_EXEC_ENV)-$(RTE_TOOLCHAIN)
 DATA_DIR := $(DESTDIR)/usr/share
 INCLUDE_DIR := $(DESTDIR)/usr/include
 SBIN_DIR := $(DESTDIR)/usr/sbin
+BIN_DIR := $(DESTDIR)/usr/bin
 export INCLUDE_DIR
 export SBIN_DIR
+export BIN_DIR
 endif

 #
-- 
2.1.0

Reply via email to