From: Andre Przywara Date: Sat, 19 Nov 2016 12:04:59 +0000 (+0000) Subject: tools/Makefile: suppress "which swig" error output X-Git-Tag: v2017.01-rc1~182 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d0fc6dc5e9aecf133845ddf338657ac69db506ef;p=oweals%2Fu-boot.git tools/Makefile: suppress "which swig" error output 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 --- diff --git a/tools/Makefile b/tools/Makefile index 9edb504fdd..5b81dde4b0 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: