From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id A2E968D89 for ; Fri, 16 Oct 2015 21:29:16 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZnAh8-0002aG-Ch; Fri, 16 Oct 2015 21:29:40 +0200 Message-ID: <56215002.50603@6wind.com> Date: Fri, 16 Oct 2015 21:29:06 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Mario Carrillo , dev@dpdk.org References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> <1444076406-30141-1-git-send-email-mario.alfredo.c.arevalo@intel.com> <1444076406-30141-2-git-send-email-mario.alfredo.c.arevalo@intel.com> In-Reply-To: <1444076406-30141-2-git-send-email-mario.alfredo.c.arevalo@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 1/7] mk: Add rule for installing headers 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, 16 Oct 2015 19:29:16 -0000 Hi Mario, Thank you for this patch series, and thank you Panu for the good comments on this series. Please see some comments below. On 10/05/2015 10:20 PM, Mario Carrillo wrote: > Add hierarchy-file support to the DPDK headers. > > When invoking "make install-headers" headers will > be installed in: $(DESTDIR)/$(INCLUDE_DIR) > where INCLUDE_DIR=/usr/include/dpdk by default. > > You can override INCLUDE_DIR var. > This hierarchy is based on: > http://www.freedesktop.org/software/systemd/man/file-hierarchy.html > > Signed-off-by: Mario Carrillo > --- > mk/rte.sdkinstall.mk | 18 +++++++++++++++++- > mk/rte.sdkroot.mk | 4 ++-- > 2 files changed, 19 insertions(+), 3 deletions(-) > > diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk > index 86c98a5..f016171 100644 > --- a/mk/rte.sdkinstall.mk > +++ b/mk/rte.sdkinstall.mk > @@ -41,6 +41,10 @@ endif > # x86_64-native-*-gcc > ifndef T > T=* > +ifneq (,$(wildcard $(BUILD_DIR)/build/.config)) What about using $(RTE_OUTPUT) here instead of $(BUILD_DIR)/build ? With you patch, the following commands work: make config T=x86_64-native-linuxapp-gcc make -j32 make install-headers DESTDIR=install Replacing all the occurences of $(BUILD_DIR)/build by $(RTE_OUTPUT) would also make the following commands work: make config T=x86_64-native-linuxapp-gcc O=build2 make -j32 O=build2 make install-headers O=build2 DESTDIR=install2 Note: the default value of RTE_OUTPUT is set to $(RTE_SRCDIR)/build in mk/rte.sdkroot.mk We also need to to replace other occurences of $(BUILD_DIR), please see my comment on patch 2/7. > +INCLUDE_DIR ?= /usr/include/dpdk > +HSLINKS := $(wildcard $(RTE_OUTPUT)/include/*) > +endif > endif > > # > @@ -72,7 +76,19 @@ install: $(INSTALL_TARGETS) > echo "Using local configuration"; \ > fi > $(Q)$(MAKE) all O=$(BUILD_DIR)/$* > - > +# > +# install headers in /usr/include/dpdk by default > +# INCLUDE_DIR can be overridden. > +# > +.PHONY: install-headers > +install-headers: > + @echo ================== Installing headers; > + @[ -d $(DESTDIR)/$(INCLUDE_DIR) ] || mkdir -p $(DESTDIR)/$(INCLUDE_DIR) I think it's useless to do the [ -d $(DESTDIR)/$(INCLUDE_DIR) ] as the 'mkdir -p' will do it as well. But maybe it could be useful to check: [ "$${HSLINKS}" != "" ] This would solve the issue described by Panu about the directories created even if they are empty. > + @for HSLINK in ${HSLINKS}; do \ Not sure to understand what is the meaning of HSLINK? HS = headers? Regards, Olivier