From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 68E2F322C for ; Thu, 29 Mar 2018 15:54:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 06:54:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,376,1517904000"; d="scan'208";a="32471958" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga002.fm.intel.com with ESMTP; 29 Mar 2018 06:54:50 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, Bruce Richardson Date: Thu, 29 Mar 2018 14:54:35 +0100 Message-Id: <20180329135436.92878-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180329135436.92878-1-bruce.richardson@intel.com> References: <20180329135436.92878-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 5/6] examples: improve error report for missing meson deps 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: Thu, 29 Mar 2018 13:54:53 -0000 When a required library is missing on a platform, rather than having meson report an error about the missing variable, catch the problem earlier and provide a more readable message. Signed-off-by: Bruce Richardson --- examples/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 16c3ab005..3d1568497 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -32,8 +32,11 @@ foreach example: examples if build dep_objs = ext_deps foreach d:deps - dep_objs += [get_variable( - get_option('default_library') + '_rte_' + d)] + var_name = get_option('default_library') + '_rte_' + d + if not is_variable(var_name) + error('Missing dependency "@0@" for example "@1@"'.format(d, name)) + endif + dep_objs += [get_variable(var_name)] endforeach if allow_experimental_apis cflags += '-DALLOW_EXPERIMENTAL_API' -- 2.14.3