From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 004CBA0AC5
	for <public@inbox.dpdk.org>; Fri,  3 May 2019 15:36:20 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id EE2615B2E;
	Fri,  3 May 2019 15:35:55 +0200 (CEST)
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id D3CB3493D
 for <dev@dpdk.org>; Fri,  3 May 2019 15:35:48 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 03 May 2019 06:35:48 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,425,1549958400"; d="scan'208";a="147876566"
Received: from silpixa00399126.ir.intel.com (HELO
 silpixa00399126.ger.corp.intel.com) ([10.237.222.236])
 by orsmga003.jf.intel.com with ESMTP; 03 May 2019 06:35:47 -0700
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri,  3 May 2019 14:35:34 +0100
Message-Id: <20190503133537.58712-4-bruce.richardson@intel.com>
X-Mailer: git-send-email 2.21.0
In-Reply-To: <20190503133537.58712-1-bruce.richardson@intel.com>
References: <20190503133537.58712-1-bruce.richardson@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove
	dependency on clang
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <20190503133534.10dh48T0H5zfNVAvxiJCIeGZsH9mlsyCS2153JmoCAE@z>

Allow the script to run with a reduced set of builds if clang, or
other compilers, are missing.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 38 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6fe..fe11e3c0a 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -28,23 +28,25 @@ build () # <directory> <meson options>
 {
 	builddir=$1
 	shift
-	if [ ! -f "$builddir/build.ninja" ] ; then
-		options="--werror -Dexamples=all $*"
-		echo "$MESON $options $srcdir $builddir"
-		$MESON $options $srcdir $builddir
-		unset CC
-	fi
-	if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then
-		# for full output from ninja use "-v"
-		echo "$ninja_cmd -v -C $builddir"
-		$ninja_cmd -v -C $builddir
-	elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then
-		# for keeping the history of short cmds, pipe through cat
-		echo "$ninja_cmd -C $builddir | cat"
-		$ninja_cmd -C $builddir | cat
-	else
-		echo "$ninja_cmd -C $builddir"
-		$ninja_cmd -C $builddir
+	if command -v $CC >/dev/null 2>&1 ; then
+		if [ ! -f "$builddir/build.ninja" ] ; then
+			options="--werror -Dexamples=all $*"
+			echo "$MESON $options $srcdir $builddir"
+			$MESON $options $srcdir $builddir
+			unset CC
+		fi
+		if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then
+			# for full output from ninja use "-v"
+			echo "$ninja_cmd -v -C $builddir"
+			$ninja_cmd -v -C $builddir
+		elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then
+			# for keeping the history of short cmds, pipe through cat
+			echo "$ninja_cmd -C $builddir | cat"
+			$ninja_cmd -C $builddir | cat
+		else
+			echo "$ninja_cmd -C $builddir"
+			$ninja_cmd -C $builddir
+		fi
 	fi
 }
 
@@ -80,7 +82,7 @@ build build-x86-default -Dmachine=$default_machine $use_shared
 c=aarch64-linux-gnu-gcc
 if command -v $c >/dev/null 2>&1 ; then
 	# compile the general v8a also for clang to increase coverage
-	export CC="ccache clang"
+	export CC="clang"
 	build build-arm64-host-clang $use_shared \
 		--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
 
-- 
2.20.1