make/toolchain.sh

changeset 207
27f8a41882a7
parent 206
f5bdca63bbe7
child 209
a6d8181a8127
--- a/make/toolchain.sh	Tue Aug 13 21:13:43 2019 +0200
+++ b/make/toolchain.sh	Tue Aug 13 21:50:16 2019 +0200
@@ -63,7 +63,7 @@
     return 0
 }
 
-printf "detect toolchain... "
+printf "detect C compiler... "
 
 for COMP in $C_COMPILERS
 do
@@ -152,7 +152,7 @@
 
 TOOLCHAIN_LD=$TOOLCHAIN_CC
 
-if [ -z TOOLCHAIN_NAME ]; then
+if [ -z "$TOOLCHAIN_NAME" ]; then
     TOOLCHAIN_DETECTION_ERROR="error"
 else
     cat >> $TEMP_DIR/config.mk << __EOF__
@@ -164,7 +164,8 @@
 	fi
     echo "LD = ${TOOLCHAIN_LD}" >> $TEMP_DIR/config.mk
     
-    if [ -e "make/${TOOLCHAIN_NAME}.mk" ]; then 
+	cat "make/${TOOLCHAIN_NAME}.mk" > /dev/null 2>&1
+    if [ $? -eq 0 ]; then 
         echo "include \$(BUILD_ROOT)/make/${TOOLCHAIN_NAME}.mk" >> $TEMP_DIR/config.mk
     fi
 fi

mercurial