Home
tests: Use command -v to find the assembler - scc - simple c99 compiler HTML git clone git://git.simple-cc.org/scc DIR Log DIR Files DIR Refs DIR Submodules DIR README DIR LICENSE --- DIR commit 4f498a90ad9f907eb9be6a09f79bdca9b3b14bce DIR parent 64f3c7719d5c78a2fb962d66ec7d04f7bb15db8f HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Wed, 16 Oct 2024 22:02:01 +0200 tests: Use command -v to find the assembler Some shells are generating an error in stderr when the assembler is not found, and it is better to use command instead of trying to execute the assembler with an empty file. Diffstat: M tests/ld/execute/Makefile | 2 +- M tests/nm/execute/Makefile | 2 +- M tests/size/execute/Makefile | 2 +- M tests/strip/execute/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- DIR diff --git a/tests/ld/execute/Makefile b/tests/ld/execute/Makefile @@ -10,7 +10,7 @@ OBJLIB = f3.o all: a.out tests: - @if $(AS) /dev/null 2>/dev/null;\ + @if command -v $(AS) >/dev/null;\ then\ $(MAKE) |\ grep -v TODO |\ DIR diff --git a/tests/nm/execute/Makefile b/tests/nm/execute/Makefile @@ -9,7 +9,7 @@ all: $(OUT) @PATH=$(ROOT)/bin:$$PATH:. chktest.sh tests: - @if $(AS) /dev/null 2>/dev/null;\ + @if command -v $(AS) >/dev/null;\ then\ $(MAKE) |\ grep -v TODO |\ DIR diff --git a/tests/size/execute/Makefile b/tests/size/execute/Makefile @@ -9,7 +9,7 @@ all: $(OUT) @PATH=$(ROOT)/bin:$$PATH:. chktest.sh tests: - @if $(AS) /dev/null 2>/dev/null;\ + @if command -v $(AS) >/dev/null;\ then\ $(MAKE) | \ grep -v TODO |\ DIR diff --git a/tests/strip/execute/Makefile b/tests/strip/execute/Makefile @@ -9,7 +9,7 @@ all: $(OUT) @PATH=$(ROOT)/bin:$$PATH:. chktest.sh tests: - @if $(AS) /dev/null 2>/dev/null;\ + @if command -v $(AS) >/dev/null;\ then\ $(MAKE) |\ grep -v TODO |\