From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 372B65B26 for ; Tue, 18 Sep 2018 12:56:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 03:56:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="73926656" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by orsmga007.jf.intel.com with ESMTP; 18 Sep 2018 03:56:04 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Tue, 18 Sep 2018 11:55:52 +0100 Message-Id: <20180918105552.58464-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2018 10:56:07 -0000 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 --- 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