summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2018-04-14 20:12:05 +0200
committerGitHub <noreply@github.com>2018-04-14 20:12:05 +0200
commitae5628e903b3fa7b302ea1cae3456625e889d0af (patch)
treeca37d19ce0161d6e16f83a3e351f8836095b1734
parentf06061aa3bb04eb8c4b38dd72413e0d8b95d9766 (diff)
downloadopenttd-ae5628e903b3fa7b302ea1cae3456625e889d0af.tar.xz
Change: [Build] prioritize cc-build over build (based on patch by woutershep2) (#6716)
This closes #6414
-rw-r--r--config.lib32
1 files changed, 16 insertions, 16 deletions
diff --git a/config.lib b/config.lib
index 5d1ea237d..92afc0230 100644
--- a/config.lib
+++ b/config.lib
@@ -1977,7 +1977,22 @@ check_compiler() {
# $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo
# $9 - What the command is to check for
- if [ -n "$3" ]; then
+ if [ -n "$4" ]; then
+ # Check for manual compiler
+ machine=`$4 $9 2>/dev/null`
+ ret=$?
+ eval "$2=\"$4\""
+
+ log 2 "executing $4 $9"
+ log 2 " returned $machine"
+ log 2 " exit code $ret"
+
+ if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
+ log 1 "checking $1... $4 not found"
+ log 1 "the selected binary doesn't seem to be a $6 binary"
+ exit 1
+ fi
+ elif [ -n "$3" ]; then
# Check for system
if [ -z "$6" ]; then
compiler="$3"
@@ -2020,21 +2035,6 @@ check_compiler() {
log 1 "the compiler suggests it doesn't build code for the machine you specified"
exit 1
fi
- elif [ -n "$4" ]; then
- # Check for manual compiler
- machine=`$4 $9 2>/dev/null`
- ret=$?
- eval "$2=\"$4\""
-
- log 2 "executing $4 $9"
- log 2 " returned $machine"
- log 2 " exit code $ret"
-
- if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
- log 1 "checking $1... $4 not found"
- log 1 "the selected binary doesn't seem to be a $6 binary"
- exit 1
- fi
else
# Nothing given, autodetect