DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Luca Boccassi <bluca@debian.org>
Subject: [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file
Date: Fri,  3 May 2019 14:35:35 +0100	[thread overview]
Message-ID: <20190503133537.58712-5-bruce.richardson@intel.com> (raw)
Message-ID: <20190503133535.jzW1uvzrCwQy_j7ju8f6l3H48-1qBZ7lXxuuqbGjj7E@z> (raw)
In-Reply-To: <20190503133537.58712-1-bruce.richardson@intel.com>

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.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 devtools/test-meson-builds.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index fe11e3c0a..03ebc29ea 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/..
 MESON=${MESON:-meson}
 use_shared="--default-library=shared"
 
+if command -v gmake >/dev/null 2>&1 ; then
+	MAKE=gmake
+else
+	MAKE=make
+fi
 if command -v ninja >/dev/null 2>&1 ; then
 	ninja_cmd=ninja
 elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -92,3 +97,21 @@ 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
+export DESTDIR=$(pwd)/$build_path/install-root
+$ninja_cmd -C $build_path install
+
+pc_file=$(find $DESTDIR -name libdpdk.pc)
+export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
+
+# Pkg-config paths need to be relative to the destination dir not globally
+# this value is picked up by our example makefiles
+export DPDK_PC_PREFIX=$DESTDIR/usr/local
+
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
+	echo "## Building $example"
+	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
+done
-- 
2.20.1


  parent reply	other threads:[~2019-05-03 13:36 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson
2019-05-03 13:35   ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson
2019-05-03 13:35   ` Bruce Richardson
2019-05-07 10:09   ` Luca Boccassi
2019-05-07 10:09     ` Luca Boccassi
2019-05-07 10:50     ` Bruce Richardson
2019-05-07 10:50       ` Bruce Richardson
2019-05-07 13:28       ` Luca Boccassi
2019-05-07 13:28         ` Luca Boccassi
2019-05-07 15:17         ` Bruce Richardson
2019-05-07 15:17           ` Bruce Richardson
2019-05-07 15:53           ` Luca Boccassi
2019-05-07 15:53             ` Luca Boccassi
2019-05-07 16:04             ` Bruce Richardson
2019-05-07 16:04               ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-05-03 13:35   ` Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson [this message]
2019-05-03 13:35   ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-05-03 13:35   ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson
2019-05-03 13:35   ` Bruce Richardson
2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson
2019-05-17 11:46   ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 11:54     ` Bruce Richardson
2019-05-17 11:46   ` [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 11:46   ` [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
2019-05-17 12:02   ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson
2019-05-17 12:02     ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 12:02     ` [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 12:02     ` [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
2019-05-17 13:12     ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi
2019-05-20 21:59       ` Thomas Monjalon
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson
2019-05-17 11:47   ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson
2019-05-17 11:47   ` [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-05-17 11:47   ` [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-05-17 11:47   ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-07-02  7:57     ` Thomas Monjalon
2019-07-02 14:35       ` Bruce Richardson
2019-07-02 15:00         ` Thomas Monjalon
2019-05-17 11:47   ` [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: " Bruce Richardson
2019-05-17 13:14   ` [dpdk-dev] [PATCH v2 0/5] improve building examples Luca Boccassi
2019-07-02 14:44   ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2019-07-02 14:44     ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson
2019-07-02 14:44     ` [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-07-02 14:44     ` [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-07-02 14:44     ` [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-07-02 14:44     ` [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: " Bruce Richardson
2019-07-02 16:12     ` [dpdk-dev] [PATCH v3 0/5] improve building examples Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503133537.58712-5-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).