From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panu Matilainen Subject: Re: [PATCH 6/7] mk: Add hierarchy-file support (lib) Date: Tue, 22 Sep 2015 10:46:43 +0300 Message-ID: <56010763.1080006@redhat.com> References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> <1442608390-12537-7-git-send-email-mario.alfredo.c.arevalo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Mario Carrillo , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8FDCA8D94 for ; Tue, 22 Sep 2015 09:46:45 +0200 (CEST) In-Reply-To: <1442608390-12537-7-git-send-email-mario.alfredo.c.arevalo@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09/18/2015 11:33 PM, Mario Carrillo wrote: > Add hierarchy-file support to the DPDK libs, > when invoking "make install H=1" (hierarchy-file) > > This hierarchy is based on: > http://www.freedesktop.org/software/systemd/man/file-hierarchy.html > > for this case, if the architecture is 64 bits libs will be > instaled in: $(DESTDIR)/usr/lib64 else it will be $(DESTDIR)/usr/lib > > Signed-off-by: Mario Carrillo > --- [...] > diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk > index 723fd97..b506959 100644 > --- a/mk/rte.sdkinstall.mk > +++ b/mk/rte.sdkinstall.mk > @@ -59,9 +59,15 @@ DATA_DIR := $(DESTDIR)/usr/share > INCLUDE_DIR := $(DESTDIR)/usr/include > SBIN_DIR := $(DESTDIR)/usr/sbin > BIN_DIR := $(DESTDIR)/usr/bin > +ifeq ($(RTE_ARCH),x86_64) > +LIB_DIR := $(DESTDIR)/usr/lib64 > +else > +LIB_DIR := $(DESTDIR)/usr/lib > +endif While this would sort of work, for now, for Fedora, RHEL and derivates, it is incorrect for the Debian world. It also misses ppc64 for which we have a config file in the tree (whether it actually builds I dont know). The location of libdir is essentially a distro level choice, upstream projects are better off with a predictable default (say, /usr/lib) that is easy to override during build/install. One possibility could be using systemd-path (if present) for querying the distro settings, eg $ systemd-path system-library-arch /usr/lib64 - Panu -