Makefile: suppress another error message on Windows
authorMaxim Belkin <maxim.belkin@gmail.com>
Fri, 6 Dec 2019 21:11:48 +0000 (15:11 -0600)
committerMaxim Belkin <maxim.belkin@gmail.com>
Fri, 6 Dec 2019 21:11:48 +0000 (15:11 -0600)
These '2>/dev/null' are important on Windows because without them
a mere `make` stalls.

Makefile

index 4daaae66a4ae8aff0c488381cc5cf055dd62d5d2..ba5080ad585489ffed3fcf2e5a0d53a9cf519b4e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ DST=_site
 # (https://stackoverflow.com/a/4933395)
 ifneq (, $(shell which python3 2>/dev/null))
   PYTHON := python3
 # (https://stackoverflow.com/a/4933395)
 ifneq (, $(shell which python3 2>/dev/null))
   PYTHON := python3
-else ifneq (, $(shell which python))
+else ifneq (, $(shell which python 2>/dev/null))
   PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
   PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
   ifneq (3, ${PYTHON_VERSION_MAJOR})
   PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
   PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
   ifneq (3, ${PYTHON_VERSION_MAJOR})