Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Christian Grünhage <jan.christian@gruenhage.xyz>2022-06-30 22:08:16 +0300
committerGitHub <noreply@github.com>2022-06-30 22:08:16 +0300
commit1a417e52d6efc0e6233efd56d86da528e3c4dd74 (patch)
tree0ad2900134bd55a6278f721ccef4c45a3ed7a68a /Makefile
parent17d52c8d647c4181922db42c91dc2828cdd79387 (diff)
use 'command -v' instead of 'which' in Makefile (#78170)
'which' is not standardized and can even be considered problematic [1] [1] https://lwn.net/Articles/874049/
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 76413449689..45421e88e0a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,9 @@ SDIST_DIR ?= 'dist'
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
MANPAGES ?= $(patsubst %.rst.in,%,$(wildcard ./docs/man/man1/ansible*.1.rst.in))
-ifneq ($(shell which rst2man 2>/dev/null),)
+ifneq ($(shell command -v rst2man 2>/dev/null),)
ASCII2MAN = rst2man $< $@
-else ifneq ($(shell which rst2man.py 2>/dev/null),)
+else ifneq ($(shell command -v rst2man.py 2>/dev/null),)
ASCII2MAN = rst2man.py $< $@
else
ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1