From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 24A275323 for ; Fri, 18 Sep 2015 22:32:59 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Sep 2015 13:33:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,554,1437462000"; d="scan'208";a="772118430" Received: from mcarril6-mobl.zpn.intel.com ([10.219.16.35]) by orsmga001.jf.intel.com with ESMTP; 18 Sep 2015 13:33:00 -0700 From: Mario Carrillo To: dev@dpdk.org Date: Fri, 18 Sep 2015 15:33:10 -0500 Message-Id: <1442608390-12537-8-git-send-email-mario.alfredo.c.arevalo@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> Subject: [dpdk-dev] [PATCH 7/7] mk: Add hierarchy-file support (linux mod) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 20:33:00 -0000 Add hierarchy-file support to the DPDK modules for linux, when invoking "make install H=1" (hierarchy-file) This hierarchy is based on: http://www.freedesktop.org/software/systemd/man/file-hierarchy.html headers will be installed in: $(DESTDIR)/lib/modules Signed-off-by: Mario Carrillo --- mk/rte.module.mk | 8 ++++++++ mk/rte.sdkinstall.mk | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/mk/rte.module.mk b/mk/rte.module.mk index 7bf77c1..4fc43ba 100644 --- a/mk/rte.module.mk +++ b/mk/rte.module.mk @@ -59,6 +59,14 @@ compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1))) .PHONY: all all: install +# +# if H (hierarchy-file) varible is equal "1" +# install modules in /lib/modules/$(KERNEL_DIR). +# +ifeq ($(H),1) + @[ -d $(MOD_DIR)/$(KERNEL_DIR) ] || mkdir -p $(MOD_DIR)/$(KERNEL_DIR) + $(Q)cp -f $(MODULE).ko $(MOD_DIR)/$(KERNEL_DIR) +endif .PHONY: install install: build _postinstall diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index b506959..5ddc3f7 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -59,6 +59,8 @@ DATA_DIR := $(DESTDIR)/usr/share INCLUDE_DIR := $(DESTDIR)/usr/include SBIN_DIR := $(DESTDIR)/usr/sbin BIN_DIR := $(DESTDIR)/usr/bin +MOD_DIR := $(DESTDIR)/lib/modules +KERNEL_DIR := $(shell uname -r)/extra ifeq ($(RTE_ARCH),x86_64) LIB_DIR := $(DESTDIR)/usr/lib64 else @@ -68,6 +70,8 @@ export INCLUDE_DIR export SBIN_DIR export BIN_DIR export LIB_DIR +export MOD_DIR +export KERNEL_DIR endif # -- 2.1.0