fix toolchain script

Tue, 13 Aug 2019 21:37:01 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 13 Aug 2019 21:37:01 +0200
changeset 10
135c0599f883
parent 9
ebdecbbb2f79
child 11
215b49563679

fix toolchain script

test/make/toolchain.sh file | annotate | diff | comparison | revisions
--- a/test/make/toolchain.sh	Tue Aug 13 21:01:48 2019 +0200
+++ b/test/make/toolchain.sh	Tue Aug 13 21:37:01 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