From patchwork Sat Nov 19 12:04:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 696830 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tLYXP2vqbz9rxv for ; Sat, 19 Nov 2016 23:07:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2BABE4B951; Sat, 19 Nov 2016 13:07:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TMgKOUocEggJ; Sat, 19 Nov 2016 13:07:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C3274B6B3; Sat, 19 Nov 2016 13:07:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A2784B6B3 for ; Sat, 19 Nov 2016 13:07:38 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4hYkFSXfbTib for ; Sat, 19 Nov 2016 13:07:38 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by theia.denx.de (Postfix) with ESMTP id 0CEA84B68A for ; Sat, 19 Nov 2016 13:07:33 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4C38016; Sat, 19 Nov 2016 04:07:30 -0800 (PST) Received: from slackpad.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3060D3F220; Sat, 19 Nov 2016 04:07:29 -0800 (PST) From: Andre Przywara To: Tom Rini , Simon Glass Date: Sat, 19 Nov 2016 12:04:59 +0000 Message-Id: <1479557099-15818-1-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 2.8.2 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] tools/Makefile: suppress "which swig" error output X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Makefile in tools/ tries to find the "swig" utility by calling "which". If nothing is found in the path, some versions of which will print an error message: $ make clean which: no swig in (/usr/local/bin:/usr/bin:/bin) This does not apply to all version of "which", though: $ echo $0 bash $ type which which is aliased to `type -path' $ which foo <== this version is OK $ /usr/bin/which foo <== this one is chatty /usr/bin/which: no foo in (/usr/local/bin:/usr/bin:/bin) $ sh <== make uses /bin/sh sh-4.3$ which foo <== no alias here which: no foo in (/usr/local/bin:/usr/bin:/bin) This error message is rather pointless in our case, since we just have this very check to care for this. So add stderr redirection to suppress the message. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 9edb504..5b81dde 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -112,7 +112,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o # Build a libfdt Python module if swig is available # Use 'sudo apt-get install swig libpython-dev' to enable this hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \ - $(if $(shell which swig),_libfdt.so) + $(if $(shell which swig 2> /dev/null),_libfdt.so) _libfdt.so-sharedobjs += $(LIBFDT_OBJS) libfdt: