]> rtime.felk.cvut.cz Git - arc.git/blobdiff - scripts/guess_cc.sh
Again, loads of refactoring and removing and adding files.
[arc.git] / scripts / guess_cc.sh
index f706f89f4d85a76c0acdab87dba1997c829343a8..396fbc04ae6d7ae21b81c30831cadd1a4fa74f3e 100644 (file)
@@ -1,4 +1,8 @@
 #/bin/bash\r
+#\r
+# Tries to get a compiler depending on SHELL/OS. On Windows it defaults\r
+# to CodeSourcery installed at c:\devtools\Codesourcery\<arch>\r
+#\r
 \r
 UNAME=`uname`\r
 echo $UNAME\r
@@ -8,32 +12,32 @@ if [ "$ARCH" == "PPC" ]; then
        if test x${UNAME:0:7} = xMINGW32; then\r
          COMPILER=/c/devtools/Codesourcery/freescale-4.3/bin/powerpc-eabi-\r
        elif test x${UNAME:0:9} = xCYGWIN_NT; then\r
-         COMPILER=/cygdrive/c/devtools/Codesourcery/freescale-4.3/bin/powerpc-eabi- \r
+         COMPILER=/cygdrive/c/devtools/Codesourcery/freescale-4.3/bin/powerpc-eabi-\r
        elif test x${UNAME:0:5} = xDarwin; then\r
          COMPILER=/opt/powerpc-eabi/bin/powerpc-eabi-\r
        else\r
          echo No default path for $UNAME set. Quitting.\r
-       fi \r
-elif [ "$ARCH" == "ARM" ]; then \r
+       fi\r
+elif [ "$ARCH" == "ARM" ]; then\r
        if test x${UNAME:0:7} = xMINGW32; then\r
          COMPILER=/c/devtools/Codesourcery/arm-2009q1/bin/arm-none-eabi-\r
        elif test x${UNAME:0:9} = xCYGWIN_NT; then\r
-         COMPILER=/cygdrive/c/devtools/Codesourcery/arm-2009q1/bin/arm-none-eabi- \r
+         COMPILER=/cygdrive/c/devtools/Codesourcery/arm-2009q1/bin/arm-none-eabi-\r
        elif test x${UNAME:0:5} = xDarwin; then\r
-         COMPILER=/opt/arm-elf/bin/arm-none-eabi-  \r
+         COMPILER=/opt/arm-elf/bin/arm-none-eabi-\r
        else\r
          echo No default path for $UNAME set. Quitting.\r
-       fi \r
-else \r
+       fi\r
+else\r
        echo baaaad\r
 fi\r
 \r
-if [ -f ${COMPILER}gcc ]; then   \r
+if [ -f ${COMPILER}gcc ]; then\r
   echo Using compiler: ${COMPILER}\r
-else \r
+else\r
    echo ${COMPILER} does not exist...\r
-   exit 1  \r
-fi     \r
+   exit 1\r
+fi\r
 \r
-export CROSS_COMPILE=$COMPILER          \r
+export CROSS_COMPILE=$COMPILER\r
 \r