$(shell) commands with no metacharacter and not starting with a shell
builtin may be execvp()'d directly instead of being run through the
shell. "command" is a shell builtin that only appears in make's own
builtin list since version 4.3, so with make <= 4.2 the USE_MINIDEBUG
probe failed with "Command not found" and silently disabled the
embedded symbol table. Adding "2>/dev/null || :" brings metacharacters
which force the shell path on all make versions.
This should fix build on older distributions such as Ubuntu 18.04.
# This should work with GNU binutils, LLVM tools, elftoolchain, and OpenBSD's
# nm.
ifeq ($(origin USE_MINIDEBUG),undefined)
-USE_MINIDEBUG := $(if $(and $(shell command -v $(XZ)),$(shell $(CC) -dM -E -xc - </dev/null 2>/dev/null | grep __ELF__),$(shell \
+USE_MINIDEBUG := $(if $(and $(shell command -v $(XZ) 2>/dev/null || :),$(shell $(CC) -dM -E -xc - </dev/null 2>/dev/null | grep __ELF__),$(shell \
printf 'static int _probe_local;\nint _probe_global;\nint main(void){ return _probe_local + _probe_global; }\n' > .minidbg_probe.c && \
$(CC) -rdynamic .minidbg_probe.c -o .minidbg_probe >/dev/null 2>&1 && \
$(NM) -P .minidbg_probe 2>/dev/null | grep -q '^_probe_local ' && \