The pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory.
Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..dfba2a782 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared --cross-file $f done fi + +############## +# Test installation of the x86-default target, to be used for checking +# the sample apps build using the pkg-config file for cflags and libs +############### +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ; export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +# rather than hacking our environment, just edit the .pc file prefix value +sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc + +for example in helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + make -C $DESTDIR/usr/local/share/dpdk/examples/$example +done -- 2.20.1