Add dpdk_config_options list to DEB_BUILD_OPTIONS 01/16001/1
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 16 Nov 2018 16:28:47 +0000 (16:28 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 16 Nov 2018 16:28:47 +0000 (16:28 +0000)
Allow users to pass a comma-separated list of meson configure options
via DEB_BUILD_OPTIONS

Change-Id: I1738428fef207d1e27a2059b07c80425a1609b50
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
debian/rules

index 3d2be92..9c05c8d 100755 (executable)
@@ -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 \