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 9EEDE37B7 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="772118410" Received: from mcarril6-mobl.zpn.intel.com ([10.219.16.35]) by orsmga001.jf.intel.com with ESMTP; 18 Sep 2015 13:32:59 -0700 From: Mario Carrillo To: dev@dpdk.org Date: Fri, 18 Sep 2015 15:33:08 -0500 Message-Id: <1442608390-12537-6-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 5/7] mk: Add hierarchy-file support (include) 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 headers, 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)/usr/include Signed-off-by: Mario Carrillo --- mk/internal/rte.install-post.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mk/internal/rte.install-post.mk b/mk/internal/rte.install-post.mk index 77addee..20c6a8b 100644 --- a/mk/internal/rte.install-post.mk +++ b/mk/internal/rte.install-post.mk @@ -63,9 +63,22 @@ $(addprefix $(RTE_OUTPUT)/$(1)/,$(notdir $(2))): $(2) $(RTE_OUTPUT)/$(1) endef +# +# generate rules to install headers in +# /usr/include +# +define copy_header_dir_rule +ifeq ($(H),1) +HEADER_DIR := $$(shell echo $(1) | sed 's/include\/*//') +$$(shell [ -d $(INCLUDE_DIR)/$(HEADER_DIR) ] || mkdir -p $(INCLUDE_DIR)/$(HEADER_DIR)) +$$(shell cp -rf $(VPATH)/$(2) $(INCLUDE_DIR)/$(HEADER_DIR)) +endif +endef + $(foreach dir,$(SYMLINK-DIRS-y),\ $(foreach file,$(SYMLINK-y-$(dir)),\ - $(eval $(call symlink_rule,$(dir),$(file))))) + $(eval $(call symlink_rule,$(dir),$(file))) \ + $(eval $(call copy_header_dir_rule,$(dir),$(file))))) # fast way, no need to do preinstall and postinstall -- 2.1.0