dpdk-fm10k/buildtools/symlink-drivers-solibs.sh
Bruce Richardson e09848337c build: fix ninja install on FreeBSD
The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e ("build: symlink drivers to library directory")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-05-02 23:07:04 +02:00

14 lines
533 B
Bash

#! /bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
# post-install script for meson/ninja builds to symlink the PMDs stored in
# $libdir/dpdk/drivers/ to $libdir. This is needed as some PMDs depend on
# others, e.g. PCI device PMDs depending on the PCI bus driver.
# parameters to script are paths relative to install prefix:
# 1. directory for installed regular libs e.g. lib64
# 2. subdirectory of libdir where the pmds are
cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .