From f3a41cf01406bd6b7611e704f46801fb06fdb182 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 16 Nov 2018 16:28:47 +0000 Subject: [PATCH] Add dpdk_config_options list to DEB_BUILD_OPTIONS Allow users to pass a comma-separated list of meson configure options via DEB_BUILD_OPTIONS Change-Id: I1738428fef207d1e27a2059b07c80425a1609b50 Signed-off-by: Luca Boccassi --- debian/rules | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 3d2be928..9c05c8d4 100755 --- a/debian/rules +++ b/debian/rules @@ -39,6 +39,15 @@ BUILD_DOCS=y endif endif +# Allow to pass specific configure flags to meson as a comma separated list +ifneq (,$(filter dpdk_config_options=%,$(DEB_BUILD_OPTIONS))) +# GNU Makefile hack: can't directly escape comma and spaces, so use variables + comma := , + space := + space += + DPDK_CONFIG_OPTIONS ?= $(subst $(comma),$(space),$(patsubst dpdk_config_options=%,%,$(filter dpdk_config_options=%,$(DEB_BUILD_OPTIONS)))) +endif + # kernel_modules can be passed via DEB_BUILD_OPTIONS to enable building the # optional binary kernel modules package. By default it will be built against # the current kernel, or ksrc can be passed with a path to the target kernel @@ -101,7 +110,7 @@ override_dh_auto_clean: dh_auto_clean override_dh_auto_configure: - dh_auto_configure -- \ + dh_auto_configure -- $(DPDK_CONFIG_OPTIONS) \ --includedir=include/dpdk \ -Dper_library_versions=false \ -Dinclude_subdir_arch=../$(DEB_HOST_MULTIARCH)/dpdk \ -- 2.16.6