Fixed CygWin build.
authorPiotr Esden-Tempski <piotr@esden.net>
Tue, 7 Dec 2010 01:34:36 +0000 (17:34 -0800)
committerPiotr Esden-Tempski <piotr@esden.net>
Tue, 7 Dec 2010 01:34:36 +0000 (17:34 -0800)
Added check if getconf exists. (CygWin does not provide that)
Added CygWin as an acceptable "OS".

summon-arm-toolchain

index 6f011a9..b7314cf 100755 (executable)
@@ -62,7 +62,11 @@ LIBOPENSTM32=master
 # Flags section
 ##############################################################################
 
-CPUS=$(getconf _NPROCESSORS_ONLN)
+if which getconf > /dev/null; then
+       CPUS=$(getconf _NPROCESSORS_ONLN)
+else
+       CPUS=1
+fi
 PARALLEL=-j$((CPUS + 1))
 echo "${CPUS} cpu's detected running make with '${PARALLEL}' flag"
 
@@ -118,6 +122,9 @@ case "$(uname)" in
                  --with-mpc=${DARWIN_OPT_PATH} \
                  -with-libiconv-prefix=${DARWIN_OPT_PATH}"
        ;;
+       CYGWIN*)
+       echo "Found CygWin that means Windows most likely."
+       ;;
        *)
        echo "Found unknown OS. Aborting!"
        exit 1