UPSTREAM: Makefile: Remove a bashism when searching for sphinx-build

e.g. when the shell is dash and sphinx-build is not installed, HAS_SPHINXBUILD would be wrongly set to yes.

(cherry picked from commit beaf9cd90b96d06f5a724bce42d3f8e4df58ea14)

Original-Change-Id: I4d89e24ec3401446acec857eae134928bc3064d2
Original-Signed-off-by: Bart De Schuymer <>
Original-Reviewed-by: Peter Marheine <>
Original-Tested-by: build bot (Jenkins) <>
Original-Reviewed-by: Patrick Georgi <>
Original-Reviewed-by: Jan Samek <>
GitOrigin-RevId: beaf9cd90b96d06f5a724bce42d3f8e4df58ea14
Change-Id: I6b8dbe8fd22488898e1fb53302a46fe9277bb1ff
Signed-off-by: chromeos-ci-prod <>
Commit-Queue: Peter Marheine <>
Reviewed-by: Peter Marheine <>
diff --git a/Makefile b/Makefile
index 1870534..462bce7 100644
--- a/Makefile
+++ b/Makefile
@@ -250,7 +250,7 @@
 HAS_LINUX_SPI       := $(call c_compile_test, Makefile.d/linux_spi_test.c)
 HAS_LINUX_I2C       := $(call c_compile_test, Makefile.d/linux_i2c_test.c)
 HAS_SERIAL          := $(strip $(if $(filter $(TARGET_OS), DOS libpayload), no, yes))
-HAS_SPHINXBUILD     := $(shell command -v $(SPHINXBUILD) &>/dev/null && echo yes || echo no)
+HAS_SPHINXBUILD     := $(shell command -v $(SPHINXBUILD) >/dev/null 2>/dev/null && echo yes || echo no)
 EXEC_SUFFIX         := $(strip $(if $(filter $(TARGET_OS), DOS MinGW), .exe))
 override CFLAGS += -Iinclude