* [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards
@ 2018-09-18 10:55 Bruce Richardson
2018-09-18 12:44 ` Timothy Redaelli
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2018-09-18 10:55 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Versions of meson prior to 0.47 flattened the parameters to the
"set_variable" function, which meant that the function could not take
array variables as a parameter. Therefore, we need to disable driver
tracking for those older versions, in order to maintain compatibility
with the minimum supported 0.41 version, and also v0.45 shipped in
Ubuntu 18.04 release.
Fixes: 806c45dd483d ("build: add configuration summary at end of config")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/meson.build | 5 ++++-
meson.build | 33 +++++++++++++++++++--------------
2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index b6ce974de..c5df313dd 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -145,5 +145,8 @@ foreach class:driver_classes
endif # build
endforeach
- set_variable(class + '_drivers', class_drivers)
+ if meson.version().version_compare('>=0.47')
+ # prior to 0.47, set_variable can't take array params
+ set_variable(class + '_drivers', class_drivers)
+ endif
endforeach
diff --git a/meson.build b/meson.build
index 7332e75b5..2ed1247a3 100644
--- a/meson.build
+++ b/meson.build
@@ -89,18 +89,23 @@ foreach lib:enabled_libs
endforeach
message(output_message + '\n')
-output_message = '\n===============\nDrivers Enabled\n===============\n'
-foreach class:driver_classes
- class_drivers = get_variable(class + '_drivers')
- output_message += '\n' + class + ':\n\t'
- output_count = 0
- foreach drv:class_drivers
- output_message += drv + ', '
- output_count += 1
- if output_count == 8
- output_message += '\n\t'
- output_count = 0
- endif
+
+# prior to 0.47 set_variable didn't work with arrays, so we can't
+# track driver lists easily
+if meson.version().version_compare('>=0.47')
+ output_message = '\n===============\nDrivers Enabled\n===============\n'
+ foreach class:driver_classes
+ class_drivers = get_variable(class + '_drivers')
+ output_message += '\n' + class + ':\n\t'
+ output_count = 0
+ foreach drv:class_drivers
+ output_message += drv + ', '
+ output_count += 1
+ if output_count == 8
+ output_message += '\n\t'
+ output_count = 0
+ endif
+ endforeach
endforeach
-endforeach
-message(output_message + '\n')
+ message(output_message + '\n')
+endif
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards
2018-09-18 10:55 [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards Bruce Richardson
@ 2018-09-18 12:44 ` Timothy Redaelli
2018-09-18 13:19 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Timothy Redaelli @ 2018-09-18 12:44 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Tue, 18 Sep 2018 11:55:52 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:
> Versions of meson prior to 0.47 flattened the parameters to the
> "set_variable" function, which meant that the function could not take
> array variables as a parameter. Therefore, we need to disable driver
> tracking for those older versions, in order to maintain compatibility
> with the minimum supported 0.41 version, and also v0.45 shipped in
> Ubuntu 18.04 release.
>
> Fixes: 806c45dd483d ("build: add configuration summary at end of
> config")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tried to build using meson 0.42.1 and it builds correctly
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards
2018-09-18 12:44 ` Timothy Redaelli
@ 2018-09-18 13:19 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-09-18 13:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Timothy Redaelli
18/09/2018 14:44, Timothy Redaelli:
> On Tue, 18 Sep 2018 11:55:52 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > Versions of meson prior to 0.47 flattened the parameters to the
> > "set_variable" function, which meant that the function could not take
> > array variables as a parameter. Therefore, we need to disable driver
> > tracking for those older versions, in order to maintain compatibility
> > with the minimum supported 0.41 version, and also v0.45 shipped in
> > Ubuntu 18.04 release.
> >
> > Fixes: 806c45dd483d ("build: add configuration summary at end of
> > config")
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Tried to build using meson 0.42.1 and it builds correctly
>
> Tested-by: Timothy Redaelli <tredaelli@redhat.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-18 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18 10:55 [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards Bruce Richardson
2018-09-18 12:44 ` Timothy Redaelli
2018-09-18 13:19 ` Thomas Monjalon
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).