From 3b2c6d517529f7232db14efb0c9beb72d4527f11 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Wed, 17 Jan 2024 22:43:30 +0100 Subject: [PATCH] Return error if tool check fails Note we leave 68000 out because we'd otherwise break the CI which lazily uses (the broken) m68k-linux-gcc for compile check. Signed-off-by: Tormod Volden --- Tools/build-6303 | 1 + Tools/build-6502 | 1 + Tools/build-65c816 | 1 + Tools/build-6800 | 1 + Tools/build-6803 | 1 + Tools/build-6809 | 2 ++ Tools/build-68hc11 | 1 + Tools/build-armm0 | 3 ++- Tools/build-armm4 | 3 ++- Tools/build-esp32 | 1 + Tools/build-esp8266 | 3 ++- Tools/build-ns32k | 3 ++- Tools/build-riscv32 | 3 ++- 13 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Tools/build-6303 b/Tools/build-6303 index 6c6bd0f2e..6bed7a56d 100755 --- a/Tools/build-6303 +++ b/Tools/build-6303 @@ -8,4 +8,5 @@ fi X=`which cc68` if [ "$X" = "" ]; then echo "CC68 is required: see https://github.com/EtchedPixels/CC6303/" + exit 1 fi diff --git a/Tools/build-6502 b/Tools/build-6502 index 87c82a829..5acd730d1 100755 --- a/Tools/build-6502 +++ b/Tools/build-6502 @@ -3,6 +3,7 @@ X=`which cc65` if [ "$X" = "" ]; then echo "CC65 is required" + exit 1 else echo -n "cc65: " cc65 -V diff --git a/Tools/build-65c816 b/Tools/build-65c816 index 87c82a829..5acd730d1 100755 --- a/Tools/build-65c816 +++ b/Tools/build-65c816 @@ -3,6 +3,7 @@ X=`which cc65` if [ "$X" = "" ]; then echo "CC65 is required" + exit 1 else echo -n "cc65: " cc65 -V diff --git a/Tools/build-6800 b/Tools/build-6800 index 6c6bd0f2e..6bed7a56d 100755 --- a/Tools/build-6800 +++ b/Tools/build-6800 @@ -8,4 +8,5 @@ fi X=`which cc68` if [ "$X" = "" ]; then echo "CC68 is required: see https://github.com/EtchedPixels/CC6303/" + exit 1 fi diff --git a/Tools/build-6803 b/Tools/build-6803 index 6c6bd0f2e..6bed7a56d 100755 --- a/Tools/build-6803 +++ b/Tools/build-6803 @@ -8,4 +8,5 @@ fi X=`which cc68` if [ "$X" = "" ]; then echo "CC68 is required: see https://github.com/EtchedPixels/CC6303/" + exit 1 fi diff --git a/Tools/build-6809 b/Tools/build-6809 index c97a505e2..cbcc88fcb 100755 --- a/Tools/build-6809 +++ b/Tools/build-6809 @@ -3,8 +3,10 @@ X=`which m6809-unknown-gcc` if [ "$X" = "" ]; then echo "GCC is required: see http://www.lwtools.ca/" + exit 1 fi X=`which lwasm` if [ "$X" = "" ]; then echo "LWTools is required: http://www.lwtools.ca/" + exit 1 fi diff --git a/Tools/build-68hc11 b/Tools/build-68hc11 index 50a342958..79977b74b 100755 --- a/Tools/build-68hc11 +++ b/Tools/build-68hc11 @@ -3,4 +3,5 @@ X=`which m6811-elf-gcc` if [ "$X" = "" ]; then echo "gcc: m6811-elf-gcc is required" + exit 1 fi diff --git a/Tools/build-armm0 b/Tools/build-armm0 index 969985408..16812c975 100755 --- a/Tools/build-armm0 +++ b/Tools/build-armm0 @@ -2,5 +2,6 @@ X=`which /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc` if [ "$X" = "" ]; then - echo "gcc: /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc" + echo "gcc: /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc is required" + exit 1 fi diff --git a/Tools/build-armm4 b/Tools/build-armm4 index 969985408..16812c975 100755 --- a/Tools/build-armm4 +++ b/Tools/build-armm4 @@ -2,5 +2,6 @@ X=`which /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc` if [ "$X" = "" ]; then - echo "gcc: /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc" + echo "gcc: /opt/gcc-arm-eabi/bin/arm-none-eabi-gcc is required" + exit 1 fi diff --git a/Tools/build-esp32 b/Tools/build-esp32 index 691275328..a209080b2 100755 --- a/Tools/build-esp32 +++ b/Tools/build-esp32 @@ -3,4 +3,5 @@ X=`which xtensa-esp32-elf-gcc` if [ "$X" = "" ]; then echo "gcc: xtensa-esp32-elf-gcc is required" + exit 1 fi diff --git a/Tools/build-esp8266 b/Tools/build-esp8266 index 66231e887..5a90e7f94 100755 --- a/Tools/build-esp8266 +++ b/Tools/build-esp8266 @@ -1,6 +1,7 @@ #!/bin/sh -X=`xtensa-lx106-elf-gcc` +X=`which xtensa-lx106-elf-gcc` if [ "$X" = "" ]; then echo "gcc: xtensa-lx106-elf-gcc is required" + exit 1 fi diff --git a/Tools/build-ns32k b/Tools/build-ns32k index 309646a9e..92112071b 100755 --- a/Tools/build-ns32k +++ b/Tools/build-ns32k @@ -2,5 +2,6 @@ X=`which ns32k-pc532-netbsd-gcc` if [ "$X" = "" ]; then - echo "gcc: ns32k-pc532-netbsd-gcc" + echo "gcc: ns32k-pc532-netbsd-gcc is required" + exit 1 fi diff --git a/Tools/build-riscv32 b/Tools/build-riscv32 index 4c3b8d65f..b20dc969f 100755 --- a/Tools/build-riscv32 +++ b/Tools/build-riscv32 @@ -2,5 +2,6 @@ X=`which riscv-unknown-elf-gcc` if [ "$X" = "" ]; then - echo "gcc: riscv-unknown-elf-gcc" + echo "gcc: riscv-unknown-elf-gcc is required" + exit 1 fi