[dpdk-dev] [PATCH 6/7] mk: Add hierarchy-file support (lib)

Panu Matilainen pmatilai at redhat.com
Tue Sep 22 09:46:43 CEST 2015


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 <mario.alfredo.c.arevalo at intel.com>
> ---
[...]
> 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 -



More information about the dev mailing list