2011-04-27 10:05:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#############################################################################
|
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
## Copyright (C) 2016 Intel Corporation.
|
|
|
|
## Contact: https://www.qt.io/licensing/
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## This file is the build configuration utility of the Qt Toolkit.
|
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
2012-09-19 12:28:29 +00:00
|
|
|
## Commercial License Usage
|
|
|
|
## Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
## accordance with the commercial license agreement provided with the
|
|
|
|
## Software or, alternatively, in accordance with the terms contained in
|
2015-01-28 08:44:43 +00:00
|
|
|
## a written agreement between you and The Qt Company. For licensing terms
|
2016-01-15 12:36:27 +00:00
|
|
|
## and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
## information use the contact form at https://www.qt.io/contact-us.
|
2012-09-19 12:28:29 +00:00
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## GNU General Public License Usage
|
|
|
|
## Alternatively, this file may be used under the terms of the GNU
|
|
|
|
## General Public License version 3 as published by the Free Software
|
|
|
|
## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
## included in the packaging of this file. Please review the following
|
|
|
|
## information to ensure the GNU General Public License requirements will
|
|
|
|
## be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## $QT_END_LICENSE$
|
|
|
|
##
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# script initialization
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# the name of this script
|
|
|
|
relconf=`basename $0`
|
|
|
|
# the directory of this script is the "source tree"
|
|
|
|
relpath=`dirname $0`
|
|
|
|
relpath=`(cd "$relpath"; /bin/pwd)`
|
|
|
|
# the current directory is the "build tree" or "object tree"
|
|
|
|
outpath=`/bin/pwd`
|
|
|
|
|
2013-11-12 17:36:15 +00:00
|
|
|
# where to find which..
|
|
|
|
unixtests="$relpath/config.tests/unix"
|
|
|
|
WHICH="$unixtests/which.test"
|
|
|
|
|
|
|
|
PERL=`$WHICH perl 2>/dev/null`
|
|
|
|
|
|
|
|
# find out which awk we want to use, prefer gawk, then nawk, then regular awk
|
|
|
|
AWK=
|
|
|
|
for e in gawk nawk awk; do
|
|
|
|
if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
|
|
|
|
AWK=$e
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# find a make command
|
|
|
|
if [ -z "$MAKE" ]; then
|
|
|
|
MAKE=
|
|
|
|
for mk in gmake make; do
|
|
|
|
if "$WHICH" $mk >/dev/null 2>&1; then
|
|
|
|
MAKE=`"$WHICH" $mk`
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "$MAKE" ]; then
|
|
|
|
echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
|
|
|
|
echo >&2 "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
# export MAKE, we need it later in the config.tests
|
|
|
|
export MAKE
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-18 13:11:11 +00:00
|
|
|
# do this early so we don't store it in config.status
|
|
|
|
CFG_TOPLEVEL=
|
|
|
|
if [ x"$1" = x"-top-level" ]; then
|
|
|
|
CFG_TOPLEVEL=yes
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# later cache the command line in config.status
|
2014-11-18 19:21:09 +00:00
|
|
|
OPT_CMDLINE=
|
|
|
|
for i in "$@"; do
|
2016-06-11 20:49:01 +00:00
|
|
|
QMAKE_CMDLINE="$QMAKE_CMDLINE
|
|
|
|
$i"
|
2014-11-18 19:21:09 +00:00
|
|
|
if [ "x$i" != "x-v" ]; then
|
|
|
|
[ -z "${i##* *}" ] && i="'$i'"
|
|
|
|
OPT_CMDLINE="$OPT_CMDLINE $i"
|
|
|
|
fi
|
|
|
|
done
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# initialize global variables
|
|
|
|
QMAKE_VARS_FILE=.qmake.vars
|
2012-03-20 21:02:21 +00:00
|
|
|
DEVICE_VARS_FILE=.device.vars
|
2015-10-12 07:55:30 +00:00
|
|
|
HOST_VARS_FILE=.host.vars
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
:> "$QMAKE_VARS_FILE"
|
2012-03-20 21:02:21 +00:00
|
|
|
:> "$DEVICE_VARS_FILE"
|
2015-10-12 07:55:30 +00:00
|
|
|
:> "$HOST_VARS_FILE"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# utility functions
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2014-11-28 13:28:49 +00:00
|
|
|
makeabs()
|
|
|
|
{
|
2016-01-07 15:56:39 +00:00
|
|
|
local FILE="$1"
|
|
|
|
local RES="$FILE"
|
2014-11-28 13:28:49 +00:00
|
|
|
if [ -z "${FILE##/*}" ]; then
|
|
|
|
true
|
|
|
|
elif [ "$OSTYPE" = "msys" -a -z "${FILE##[a-zA-Z]:[/\\]*}" ]; then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
RES=$PWD/$FILE
|
|
|
|
fi
|
|
|
|
RES=$RES/
|
|
|
|
while true; do
|
|
|
|
nres=`echo "$RES" | sed 's,/[^/][^/]*/\.\./,/,g; s,/\./,/,g'`
|
|
|
|
test x"$nres" = x"$RES" && break
|
|
|
|
RES=$nres
|
|
|
|
done
|
|
|
|
echo "$RES" | sed 's,//,/,g; s,/$,,'
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# Adds a new qmake variable to the cache
|
|
|
|
# Usage: QMakeVar mode varname contents
|
|
|
|
# where mode is one of: set, add, del
|
|
|
|
QMakeVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
add)
|
|
|
|
eq="+="
|
|
|
|
;;
|
|
|
|
del)
|
|
|
|
eq="-="
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo >&2 "BUG: wrong command to QMakeVar: $1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Helper function for getQMakeConf. It parses include statements in
|
|
|
|
# qmake.conf and prints out the expanded file
|
2013-03-05 12:17:39 +00:00
|
|
|
expandQMakeConf()
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
while read line; do case "$line" in
|
|
|
|
include*)
|
2013-12-05 18:44:09 +00:00
|
|
|
inc_file=`echo "$line" | sed -n -e '/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p'`
|
2011-04-27 10:05:43 +00:00
|
|
|
current_dir=`dirname "$1"`
|
|
|
|
conf_file="$current_dir/$inc_file"
|
|
|
|
if [ ! -f "$conf_file" ]; then
|
|
|
|
echo "WARNING: Unable to find file $conf_file" >&2
|
|
|
|
continue
|
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
expandQMakeConf "$conf_file" "$2"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2012-05-31 06:13:10 +00:00
|
|
|
*load\(device_config\)*)
|
2015-10-12 07:55:30 +00:00
|
|
|
conf_file="$2"
|
2012-05-31 06:13:10 +00:00
|
|
|
if [ ! -f "$conf_file" ]; then
|
|
|
|
echo "WARNING: Unable to find file $conf_file" >&2
|
|
|
|
continue
|
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
expandQMakeConf "$conf_file" "$2"
|
2012-05-31 06:13:10 +00:00
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
*)
|
|
|
|
echo "$line"
|
|
|
|
;;
|
|
|
|
esac; done < "$1"
|
|
|
|
}
|
|
|
|
|
2013-03-05 12:17:39 +00:00
|
|
|
extractQMakeVariables()
|
2012-01-31 11:49:53 +00:00
|
|
|
{
|
configure: fix expanding system commands in qmake parser with GNU awk < 4
qmake variables using $$system() were incorrectly parsed by the custom
qmake parser in the configure script, when using GNU awk 3.1.8 or
earlier. They are parsed correctly with GNU awk 4 or mawk.
This was occurring with such an assignement (from an extra mkspecs file):
QMAKE_CC = $$system($$CMD QMAKE_CC 2>/dev/null)
The custom qmake parser in the configure script first attempts to
expand $$UPPERCASE variables, before running $$system(), using this:
match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)
But when using non-ASCII locales with GNU awk 3.1.8 or earlier,
$$system was expanded (to an empty string) because these earlier awk
versions match lowercase letters for the [A-Z] regexp, which is
traditionally used to match uppercase letters.
This behavior has been changed in GNU awk 4.0.0, which only matches
uppercase letters for [A-Z] by default. A workaround for earlier GNU
awk versions is to run awk with the C locale.
See GNU awk NEWS "Changes from 3.1.8 to 4.0.0":
25. Gawk now treats ranges of the form [d-h] as if they were in the C
locale, no matter what kind of regexp is being used, and even if
--posix. The latest POSIX standard allows this, and the documentation
has been updated. Maybe this will stop all the questions about
[a-z] matching uppercase letters.
THIS CHANGES BEHAVIOR!!!!
See also gawk.info "A.7 Regexp Ranges and Locales: A Long Sad Story"
Change-Id: Ibb3eb28738c3e77d496c634e1f5c9f630957e730
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-19 13:12:36 +00:00
|
|
|
LC_ALL=C $AWK '
|
2012-01-31 11:49:53 +00:00
|
|
|
BEGIN {
|
|
|
|
values["LITERAL_WHITESPACE"] = " "
|
|
|
|
values["LITERAL_DOLLAR"] = "$"
|
|
|
|
}
|
2013-03-06 22:06:46 +00:00
|
|
|
/^!?host_build:/ {
|
|
|
|
scopeStart = index($0, ":") + 1
|
|
|
|
condition = substr($0, 0, scopeStart - 2)
|
|
|
|
if (condition != "'"$1"'") { next }
|
|
|
|
$0 = substr($0, scopeStart)
|
|
|
|
}
|
2012-02-25 12:48:49 +00:00
|
|
|
/^[_A-Z0-9.]+[ \t]*\+?=/ {
|
2012-01-31 11:49:53 +00:00
|
|
|
valStart = index($0, "=") + 1
|
|
|
|
|
|
|
|
append = 0
|
|
|
|
if (substr($0, valStart - 2, 1) == "+") {
|
|
|
|
append = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
variable = substr($0, 0, valStart - 2 - append)
|
|
|
|
value = substr($0, valStart)
|
|
|
|
gsub("[ \t]+", "", variable)
|
|
|
|
gsub("^[ \t]+", "", value)
|
|
|
|
gsub("[ \t]+$", "", value)
|
|
|
|
|
|
|
|
ovalue = ""
|
|
|
|
while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
|
|
|
|
ovalue = ovalue substr(value, 1, RSTART - 1)
|
|
|
|
var = substr(value, RSTART + 2, RLENGTH - 2)
|
|
|
|
value = substr(value, RSTART + RLENGTH)
|
2012-04-30 12:29:26 +00:00
|
|
|
if (var ~ /^\{/) {
|
2012-01-31 11:49:53 +00:00
|
|
|
var = substr(var, 2, length(var) - 2)
|
|
|
|
}
|
|
|
|
ovalue = ovalue values[var]
|
|
|
|
}
|
2012-10-26 13:04:02 +00:00
|
|
|
value = ovalue value
|
|
|
|
|
|
|
|
ovalue = ""
|
2013-03-02 17:28:57 +00:00
|
|
|
while (match(value, /\$\$system\(("[^"]*"|[^)]*)\)/)) {
|
2012-10-26 13:04:02 +00:00
|
|
|
ovalue = ovalue substr(value, 1, RSTART - 1)
|
|
|
|
cmd = substr(value, RSTART + 9, RLENGTH - 10)
|
2013-03-02 17:28:57 +00:00
|
|
|
gsub(/^"|"$/, "", cmd)
|
2012-10-26 13:04:02 +00:00
|
|
|
value = substr(value, RSTART + RLENGTH)
|
|
|
|
while ((cmd | getline line) > 0) {
|
|
|
|
ovalue = ovalue line
|
|
|
|
}
|
|
|
|
close(cmd)
|
|
|
|
}
|
|
|
|
value = ovalue value
|
2012-01-31 11:49:53 +00:00
|
|
|
|
|
|
|
combinedValue = values[variable]
|
|
|
|
if (append == 1 && length(combinedValue) > 0) {
|
2012-10-26 13:04:02 +00:00
|
|
|
combinedValue = combinedValue " " value
|
2012-01-31 11:49:53 +00:00
|
|
|
} else {
|
2012-10-26 13:04:02 +00:00
|
|
|
combinedValue = value
|
2012-01-31 11:49:53 +00:00
|
|
|
}
|
|
|
|
values[variable] = combinedValue
|
|
|
|
}
|
|
|
|
END {
|
|
|
|
for (var in values) {
|
|
|
|
print var "=" values[var]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'
|
|
|
|
}
|
|
|
|
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable()
|
2012-01-31 11:49:53 +00:00
|
|
|
{
|
|
|
|
echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-02-27 14:01:25 +00:00
|
|
|
macSDKify()
|
|
|
|
{
|
|
|
|
# Normally we take care of sysrootifying in sdk.prf, but configure extracts some
|
|
|
|
# values before qmake is even built, so we have to duplicate the logic here.
|
|
|
|
|
|
|
|
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
|
|
|
|
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
|
2013-04-08 14:34:33 +00:00
|
|
|
sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
|
2013-02-27 14:01:25 +00:00
|
|
|
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
|
|
|
|
|
|
|
|
case "$sdk" in
|
|
|
|
macosx*)
|
|
|
|
version_min_flag="-mmacosx-version-min=$(getSingleQMakeVariable QMAKE_MACOSX_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
iphoneos*)
|
|
|
|
version_min_flag="-miphoneos-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
iphonesimulator*)
|
|
|
|
version_min_flag="-mios-simulator-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
2016-02-16 14:29:59 +00:00
|
|
|
appletvos*)
|
|
|
|
version_min_flag="-mappletvos-version-min=$(getSingleQMakeVariable QMAKE_TVOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
appletvsimulator*)
|
|
|
|
version_min_flag="-mtvos-simulator-version-min=$(getSingleQMakeVariable QMAKE_TVOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
2013-02-27 14:01:25 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$1" | while read line; do
|
|
|
|
case "$line" in
|
|
|
|
QMAKE_CC=*|QMAKE_CXX=*|QMAKE_FIX_RPATH=*|QMAKE_AR=*|QMAKE_RANLIB=*|QMAKE_LINK=*|QMAKE_LINK_SHLIB=*)
|
|
|
|
# Prefix tool with toolchain path
|
|
|
|
var=$(echo "$line" | cut -d '=' -f 1)
|
|
|
|
val=$(echo "$line" | cut -d '=' -f 2-)
|
2013-04-08 14:34:33 +00:00
|
|
|
sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d ' ' -f 1))
|
2013-02-27 14:01:25 +00:00
|
|
|
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
|
|
|
|
echo "$var=$val"
|
|
|
|
;;
|
Distinguish between Objective-C and Objective-C++ sources
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.
This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.
The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.
Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-02 11:54:33 +00:00
|
|
|
QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*)
|
2013-02-27 14:01:25 +00:00
|
|
|
echo "$line -isysroot $sysroot $version_min_flag"
|
|
|
|
;;
|
|
|
|
QMAKE_LFLAGS=*)
|
|
|
|
echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "$line"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# relies on $QMAKESPEC being set correctly. parses include statements in
|
|
|
|
# qmake.conf and prints out the expanded file
|
|
|
|
getQMakeConf()
|
|
|
|
{
|
2012-01-31 11:49:53 +00:00
|
|
|
if [ -z "$specvals" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" "$HOST_VARS_FILE" | extractQMakeVariables "host_build"`
|
2013-02-27 14:01:25 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable "$1" "$specvals"
|
2012-01-31 11:49:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getXQMakeConf()
|
|
|
|
{
|
|
|
|
if [ -z "$xspecvals" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" "$DEVICE_VARS_FILE" | extractQMakeVariables "!host_build"`
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi
|
2012-01-31 11:49:53 +00:00
|
|
|
fi
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable "$1" "$xspecvals"
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
2012-03-20 21:02:21 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# device options
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
DeviceVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
*)
|
2015-11-18 10:06:33 +00:00
|
|
|
echo >&2 "BUG: wrong command to DeviceVar: $1"
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
2012-05-15 15:44:13 +00:00
|
|
|
resolveDeviceMkspec()
|
|
|
|
{
|
2012-06-08 22:26:54 +00:00
|
|
|
result=$(find "$relpath/mkspecs/devices/" -type d -name "*$1*" | sed "s,^$relpath/mkspecs/,,")
|
2012-05-15 15:44:13 +00:00
|
|
|
match_count=$(echo "$result" | wc -w)
|
|
|
|
if [ "$match_count" -gt 1 ]; then
|
2012-06-08 22:26:54 +00:00
|
|
|
echo >&2 "Error: Multiple matches for device '$1'. Candidates are:"
|
2013-12-05 18:44:09 +00:00
|
|
|
tabbed_result=$(echo "$result" | sed 's,^, ,')
|
2012-05-15 15:44:13 +00:00
|
|
|
echo >&2 "$tabbed_result"
|
|
|
|
echo "undefined"
|
|
|
|
elif [ "$match_count" -eq 0 ]; then
|
2012-06-08 22:26:54 +00:00
|
|
|
echo >&2 "Error: No device matching '$1'"
|
2012-05-15 15:44:13 +00:00
|
|
|
echo "undefined"
|
2012-05-19 17:24:48 +00:00
|
|
|
else
|
|
|
|
echo "$result"
|
2012-05-15 15:44:13 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Host options
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
HostVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
*)
|
2015-11-18 10:07:34 +00:00
|
|
|
echo >&2 "BUG: wrong command to HostVar: $1"
|
2015-10-12 07:55:30 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$HOST_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# operating system detection
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# need that throughout the script
|
|
|
|
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
|
|
|
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|
|
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
|
|
|
|
|
|
# detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
|
|
|
|
if echo '\c' | grep '\c' >/dev/null; then
|
|
|
|
ECHO_N=-n
|
|
|
|
else
|
|
|
|
ECHO_C='\c'
|
|
|
|
fi
|
|
|
|
|
|
|
|
BUILD_ON_MAC=no
|
|
|
|
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
|
|
|
|
BUILD_ON_MAC=yes
|
|
|
|
fi
|
2013-02-19 21:54:36 +00:00
|
|
|
HOST_DIRLIST_SEP=":"
|
2013-04-07 15:58:42 +00:00
|
|
|
DEV_NULL=/dev/null
|
2013-02-02 12:31:53 +00:00
|
|
|
if [ "$OSTYPE" = "msys" ]; then
|
2013-02-19 21:54:36 +00:00
|
|
|
HOST_DIRLIST_SEP=";"
|
2013-04-07 15:58:42 +00:00
|
|
|
DEV_NULL=/tmp/empty-file
|
|
|
|
echo "" > $DEV_NULL
|
2013-05-11 21:36:51 +00:00
|
|
|
relpath=`(cd "$relpath"; pwd -W)`
|
|
|
|
outpath=`pwd -W`
|
2013-02-02 12:31:53 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-04-08 14:41:27 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Verify Xcode installation on Mac OS
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
|
|
|
|
echo >&2
|
|
|
|
echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
|
|
|
|
echo " version. See the xcode-select man page for more information." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
|
|
|
|
echo >&2
|
|
|
|
echo " Xcode not set up properly. You may need to confirm the license" >&2
|
|
|
|
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Qt version detection
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-09-18 01:17:40 +00:00
|
|
|
QT_VERSION=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_MAJOR_VERSION=
|
|
|
|
QT_MINOR_VERSION=0
|
|
|
|
QT_PATCH_VERSION=0
|
2015-09-18 01:17:40 +00:00
|
|
|
eval `sed -n -e 's/^MODULE_VERSION = \(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*\)$/QT_VERSION=\1\
|
|
|
|
QT_MAJOR_VERSION=\2\
|
|
|
|
QT_MINOR_VERSION=\3\
|
|
|
|
QT_PATCH_VERSION=\4/p' < "$relpath"/.qmake.conf`
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -z "$QT_MAJOR_VERSION" ]; then
|
2015-09-18 01:17:40 +00:00
|
|
|
echo "Cannot process version from .qmake.conf"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# initalize variables
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2015-04-02 13:59:51 +00:00
|
|
|
SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
for varname in $SYSTEM_VARIABLES; do
|
|
|
|
qmakevarname="${varname}"
|
2015-04-02 13:59:51 +00:00
|
|
|
qmakecmdargs=""
|
2011-04-27 10:05:43 +00:00
|
|
|
# use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
|
|
|
|
if [ "${varname}" = "LDFLAGS" ]; then
|
|
|
|
qmakevarname="LFLAGS"
|
|
|
|
elif [ "${varname}" = "LD" ]; then
|
|
|
|
qmakevarname="LINK"
|
2015-04-02 13:59:51 +00:00
|
|
|
elif [ "${varname}" = "AR" ]; then
|
|
|
|
# QMAKE_AR needs to be set to "/path/to/ar cqs" but the
|
|
|
|
# environment variable will be set to the command only so we
|
|
|
|
# need to append " cqs" for autoconf compatibility
|
|
|
|
qmakecmdargs=" cqs"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
cmd=`echo \
|
|
|
|
'if [ -n "\$'${varname}'" ]; then
|
2015-04-02 13:59:51 +00:00
|
|
|
QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi'`
|
|
|
|
eval "$cmd"
|
|
|
|
done
|
2015-04-02 13:59:51 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# Use CC/CXX to run config.tests
|
|
|
|
mkdir -p "$outpath/config.tests"
|
|
|
|
rm -f "$outpath/config.tests/.qmake.cache"
|
|
|
|
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
|
|
|
|
|
|
|
|
# QTDIR may be set and point to an old or system-wide Qt installation
|
|
|
|
unset QTDIR
|
|
|
|
|
|
|
|
# initalize internal variables
|
2015-10-26 11:38:50 +00:00
|
|
|
CFG_RELEASE_TOOLS=no
|
2013-06-17 09:21:40 +00:00
|
|
|
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
2012-07-09 22:58:19 +00:00
|
|
|
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_BUILD_PARTS=""
|
|
|
|
CFG_NOBUILD_PARTS=""
|
2014-09-30 08:34:00 +00:00
|
|
|
CFG_ANDROID_STYLE_ASSETS=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
|
2016-02-16 14:29:59 +00:00
|
|
|
XPLATFORM_MAC=no # Whether target platform is OS X, iOS or tvOS
|
2014-09-30 14:39:12 +00:00
|
|
|
XPLATFORM_IOS=no # Whether target platform is iOS
|
2016-02-16 14:29:59 +00:00
|
|
|
XPLATFORM_TVOS=no # Whether target platform is tvOS
|
2013-03-04 09:16:42 +00:00
|
|
|
XPLATFORM_ANDROID=no
|
2011-04-27 10:05:43 +00:00
|
|
|
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
|
|
|
|
PLATFORM=$QMAKESPEC
|
|
|
|
OPT_CONFIRM_LICENSE=no
|
|
|
|
OPT_SHADOW=maybe
|
|
|
|
OPT_VERBOSE=no
|
|
|
|
OPT_HELP=
|
|
|
|
CFG_SILENT=no
|
2013-10-15 14:19:26 +00:00
|
|
|
OPT_MAC_SDK=
|
2013-11-12 20:29:38 +00:00
|
|
|
COMMERCIAL_USER=ask
|
|
|
|
CFG_DEV=no
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# initalize variables used for installation
|
|
|
|
QT_INSTALL_PREFIX=
|
|
|
|
QT_INSTALL_DOCS=
|
|
|
|
QT_INSTALL_HEADERS=
|
|
|
|
QT_INSTALL_LIBS=
|
|
|
|
QT_INSTALL_BINS=
|
2012-10-25 21:32:09 +00:00
|
|
|
QT_INSTALL_LIBEXECS=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_INSTALL_PLUGINS=
|
|
|
|
QT_INSTALL_IMPORTS=
|
2012-10-15 20:23:13 +00:00
|
|
|
QT_INSTALL_QML=
|
2012-09-24 12:30:45 +00:00
|
|
|
QT_INSTALL_ARCHDATA=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_INSTALL_DATA=
|
|
|
|
QT_INSTALL_TRANSLATIONS=
|
|
|
|
QT_INSTALL_SETTINGS=
|
|
|
|
QT_INSTALL_EXAMPLES=
|
2011-11-17 05:39:19 +00:00
|
|
|
QT_INSTALL_TESTS=
|
2012-02-28 19:57:38 +00:00
|
|
|
CFG_SYSROOT=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_HOST_PREFIX=
|
2012-02-28 19:57:38 +00:00
|
|
|
QT_HOST_BINS=
|
2013-05-08 13:30:56 +00:00
|
|
|
QT_HOST_LIBS=
|
2012-02-28 19:57:38 +00:00
|
|
|
QT_HOST_DATA=
|
2013-08-09 11:34:04 +00:00
|
|
|
QT_EXT_PREFIX=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
# default qpa platform
|
|
|
|
|
2013-11-12 17:34:28 +00:00
|
|
|
# Android vars
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
|
|
|
|
CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
|
2016-05-27 13:34:11 +00:00
|
|
|
CFG_DEFAULT_ANDROID_PLATFORM=android-16
|
2013-11-12 17:34:28 +00:00
|
|
|
CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
|
2014-10-30 12:03:00 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.9
|
2013-11-12 17:34:28 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# parse command line arguments
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# parse the arguments, setting things to "yes" or "no"
|
|
|
|
while [ "$#" -gt 0 ]; do
|
|
|
|
CURRENT_OPT="$1"
|
|
|
|
UNKNOWN_ARG=no
|
|
|
|
case "$1" in
|
|
|
|
#Autoconf style options
|
|
|
|
--enable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--enable-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
--disable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--disable-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*=*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--\(.*\)=.*,\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^--.*=\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
--no-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--no-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
#Qt plugin options
|
|
|
|
-no-*-*|-plugin-*-*|-qt-*-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-\([^-]*\).*,\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
#Qt style no options
|
|
|
|
-no-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-no-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
#Qt style options that pass an argument
|
2013-06-14 13:55:06 +00:00
|
|
|
-prefix| \
|
|
|
|
-docdir| \
|
|
|
|
-headerdir| \
|
|
|
|
-plugindir| \
|
|
|
|
-importdir| \
|
|
|
|
-qmldir| \
|
|
|
|
-archdatadir| \
|
|
|
|
-datadir| \
|
|
|
|
-libdir| \
|
|
|
|
-bindir| \
|
|
|
|
-libexecdir| \
|
|
|
|
-translationdir| \
|
|
|
|
-sysconfdir| \
|
|
|
|
-examplesdir| \
|
|
|
|
-testsdir| \
|
|
|
|
-hostdatadir| \
|
|
|
|
-hostbindir| \
|
|
|
|
-hostlibdir| \
|
2013-08-09 11:34:04 +00:00
|
|
|
-extprefix| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-sysroot| \
|
2015-10-12 07:55:30 +00:00
|
|
|
-external-hostbindir| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-make| \
|
|
|
|
-nomake| \
|
|
|
|
-skip| \
|
|
|
|
-platform| \
|
|
|
|
-xplatform| \
|
|
|
|
-device| \
|
|
|
|
-device-option| \
|
2015-10-12 07:55:30 +00:00
|
|
|
-host-option| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-sdk| \
|
|
|
|
-android-sdk| \
|
|
|
|
-android-ndk| \
|
|
|
|
-android-ndk-platform| \
|
|
|
|
-android-ndk-host| \
|
|
|
|
-android-arch| \
|
|
|
|
-android-toolchain-version)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
|
|
|
#Qt style complex options in one command
|
|
|
|
-enable-*|-disable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
#Qt Builtin/System style options
|
|
|
|
-no-*|-system-*|-qt-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
#Options that cannot be generalized
|
|
|
|
-hostprefix)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
# this option may or may not be followed by an argument
|
|
|
|
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
|
|
|
|
VAL=$outpath
|
|
|
|
else
|
|
|
|
shift;
|
|
|
|
VAL=$1
|
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
;;
|
2012-04-02 17:14:19 +00:00
|
|
|
#General options, including Qt style yes options
|
2011-04-27 10:05:43 +00:00
|
|
|
-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2012-04-02 17:14:19 +00:00
|
|
|
VAL="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
# most options don't need processing in the configure script, skip them. qmake will do the real validation
|
2011-04-27 10:05:43 +00:00
|
|
|
*)
|
|
|
|
shift
|
|
|
|
continue
|
2016-06-11 20:49:01 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
shift
|
|
|
|
|
|
|
|
UNKNOWN_OPT=no
|
|
|
|
case "$VAR" in
|
|
|
|
prefix)
|
|
|
|
QT_INSTALL_PREFIX="$VAL"
|
|
|
|
;;
|
|
|
|
hostprefix)
|
|
|
|
QT_HOST_PREFIX="$VAL"
|
|
|
|
;;
|
2012-02-28 19:57:38 +00:00
|
|
|
hostdatadir)
|
|
|
|
QT_HOST_DATA="$VAL"
|
|
|
|
;;
|
|
|
|
hostbindir)
|
|
|
|
QT_HOST_BINS="$VAL"
|
|
|
|
;;
|
2013-05-08 13:30:56 +00:00
|
|
|
hostlibdir)
|
|
|
|
QT_HOST_LIBS="$VAL"
|
|
|
|
;;
|
2013-08-09 11:34:04 +00:00
|
|
|
extprefix)
|
|
|
|
QT_EXT_PREFIX="$VAL"
|
|
|
|
;;
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
pkg-config)
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
force-pkg-config)
|
|
|
|
;;
|
|
|
|
docdir)
|
|
|
|
QT_INSTALL_DOCS="$VAL"
|
|
|
|
;;
|
|
|
|
headerdir)
|
|
|
|
QT_INSTALL_HEADERS="$VAL"
|
|
|
|
;;
|
|
|
|
plugindir)
|
|
|
|
QT_INSTALL_PLUGINS="$VAL"
|
|
|
|
;;
|
|
|
|
importdir)
|
|
|
|
QT_INSTALL_IMPORTS="$VAL"
|
|
|
|
;;
|
2012-10-15 20:23:13 +00:00
|
|
|
qmldir)
|
|
|
|
QT_INSTALL_QML="$VAL"
|
|
|
|
;;
|
2012-09-24 12:30:45 +00:00
|
|
|
archdatadir)
|
|
|
|
QT_INSTALL_ARCHDATA="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
datadir)
|
|
|
|
QT_INSTALL_DATA="$VAL"
|
|
|
|
;;
|
|
|
|
libdir)
|
|
|
|
QT_INSTALL_LIBS="$VAL"
|
|
|
|
;;
|
|
|
|
translationdir)
|
|
|
|
QT_INSTALL_TRANSLATIONS="$VAL"
|
|
|
|
;;
|
|
|
|
sysconfdir|settingsdir)
|
|
|
|
QT_INSTALL_SETTINGS="$VAL"
|
|
|
|
;;
|
|
|
|
examplesdir)
|
|
|
|
QT_INSTALL_EXAMPLES="$VAL"
|
|
|
|
;;
|
2011-11-17 05:39:19 +00:00
|
|
|
testsdir)
|
|
|
|
QT_INSTALL_TESTS="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
sysroot)
|
|
|
|
CFG_SYSROOT="$VAL"
|
|
|
|
;;
|
2015-10-12 07:55:30 +00:00
|
|
|
external-hostbindir)
|
|
|
|
CFG_HOST_QT_TOOLS_PATH="$VAL"
|
|
|
|
HostVar set HOST_QT_TOOLS "$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
bindir)
|
|
|
|
QT_INSTALL_BINS="$VAL"
|
|
|
|
;;
|
2012-10-25 21:32:09 +00:00
|
|
|
libexecdir)
|
|
|
|
QT_INSTALL_LIBEXECS="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
nomake)
|
2013-06-17 09:21:40 +00:00
|
|
|
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
|
|
|
echo "Unknown part $VAL passed to -nomake." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
|
|
|
;;
|
|
|
|
make)
|
2013-06-17 09:49:53 +00:00
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
else
|
|
|
|
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
|
|
|
echo "Unknown part $VAL passed to -make." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
2013-06-17 09:21:40 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
sdk)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2013-03-06 12:52:46 +00:00
|
|
|
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
|
2013-10-15 14:19:26 +00:00
|
|
|
OPT_MAC_SDK="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
platform)
|
|
|
|
PLATFORM="$VAL"
|
|
|
|
;;
|
|
|
|
xplatform)
|
|
|
|
XPLATFORM="$VAL"
|
|
|
|
;;
|
2012-03-20 21:02:21 +00:00
|
|
|
device)
|
2012-05-15 15:44:13 +00:00
|
|
|
XPLATFORM=`resolveDeviceMkspec $VAL`
|
|
|
|
[ "$XPLATFORM" = "undefined" ] && exit 101
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
|
|
|
device-option)
|
2013-09-20 21:14:39 +00:00
|
|
|
DEV_VAR=`echo $VAL | cut -d '=' -f 1`
|
|
|
|
DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
|
2013-03-08 10:53:10 +00:00
|
|
|
DeviceVar set $DEV_VAR "$DEV_VAL"
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
2015-10-12 07:55:30 +00:00
|
|
|
host-option)
|
|
|
|
HOST_VAR=`echo $VAL | cut -d '=' -f 1`
|
|
|
|
HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
|
|
|
|
HostVar set $HOST_VAR "$HOST_VAL"
|
|
|
|
;;
|
2015-10-26 11:38:50 +00:00
|
|
|
optimized-qmake|optimized-tools)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_RELEASE_TOOLS="$VAL"
|
|
|
|
fi
|
|
|
|
;;
|
2013-11-12 20:29:38 +00:00
|
|
|
developer-build)
|
|
|
|
CFG_DEV="yes"
|
|
|
|
;;
|
|
|
|
commercial)
|
|
|
|
COMMERCIAL_USER="yes"
|
|
|
|
;;
|
|
|
|
opensource)
|
|
|
|
COMMERCIAL_USER="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
feature-*)
|
2014-11-08 11:42:00 +00:00
|
|
|
FEATURE=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,' | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
|
|
|
|
if grep "^Feature: *${FEATURE} *\$" "$relpath"/src/corelib/global/qfeatures.txt >/dev/null 2>&1; then
|
2016-06-11 20:49:01 +00:00
|
|
|
F=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "no" ]; then
|
2016-06-11 20:49:01 +00:00
|
|
|
F="no-$F"
|
|
|
|
elif [ "$VAL" != "yes" ] && [ "$VAL" != "unknown" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
CFG_FEATURES="$CFG_FEATURES $F"
|
2014-11-08 11:42:00 +00:00
|
|
|
else
|
|
|
|
echo "ERROR: Unknown feature $FEATURE"
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
confirm-license)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_CONFIRM_LICENSE="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
h|help)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_HELP="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
v|verbose)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_VERBOSE=yes
|
|
|
|
elif [ "$VAL" = "no" ]; then
|
|
|
|
OPT_VERBOSE=no
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
silent)
|
|
|
|
# need to keep this here, to ensure qmake is built silently
|
|
|
|
CFG_SILENT="$VAL"
|
2011-10-14 13:55:35 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-sdk)
|
|
|
|
CFG_DEFAULT_ANDROID_SDK_ROOT="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-ndk)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_ROOT="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-ndk-platform)
|
|
|
|
CFG_DEFAULT_ANDROID_PLATFORM="$VAL"
|
2015-10-29 13:59:59 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-ndk-host)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-arch)
|
|
|
|
CFG_DEFAULT_ANDROID_TARGET_ARCH="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-toolchain-version)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
android-style-assets)
|
|
|
|
# Required to be able to show the correct license text
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ANDROID_STYLE_ASSETS="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*)
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
esac
|
|
|
|
if [ "$UNKNOWN_OPT" = "yes" ]; then
|
|
|
|
echo "${CURRENT_OPT}: invalid command-line switch"
|
|
|
|
ERROR=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
[ "x$ERROR" = "xyes" ] && exit 1
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# help - interactive parts of the script _after_ this section please
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ "$OPT_HELP" = "yes" ]; then
|
|
|
|
cat $relpath/config_help.txt
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# platform detection
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ -z "$PLATFORM" ]; then
|
|
|
|
PLATFORM_NOTES=
|
|
|
|
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
|
|
|
|
Darwin:*)
|
|
|
|
PLATFORM=macx-clang
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
AIX:*)
|
|
|
|
#PLATFORM=aix-g++
|
|
|
|
#PLATFORM=aix-g++-64
|
|
|
|
PLATFORM=aix-xlc
|
|
|
|
#PLATFORM=aix-xlc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
|
|
|
|
"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
GNU:*)
|
|
|
|
PLATFORM=hurd-g++
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
dgux:*)
|
|
|
|
PLATFORM=dgux-g++
|
2011-12-30 00:44:16 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
# DYNIX/ptx:4*)
|
|
|
|
# PLATFORM=dynix-g++
|
|
|
|
# ;;
|
|
|
|
ULTRIX:*)
|
|
|
|
PLATFORM=ultrix-g++
|
2015-07-17 21:46:05 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
FreeBSD:*)
|
|
|
|
if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
|
|
|
|
PLATFORM=freebsd-clang
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for FreeBSD: freebsd-g++
|
|
|
|
"
|
2012-03-02 16:43:52 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
PLATFORM=freebsd-g++
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for FreeBSD: freebsd-clang
|
|
|
|
"
|
2012-03-02 16:43:52 +00:00
|
|
|
fi
|
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
OpenBSD:*)
|
|
|
|
PLATFORM=openbsd-g++
|
2012-03-02 16:43:52 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
NetBSD:*)
|
|
|
|
PLATFORM=netbsd-g++
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
BSD/OS:*|BSD/386:*)
|
|
|
|
PLATFORM=bsdi-g++
|
2014-07-01 09:46:50 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
IRIX*:*)
|
|
|
|
#PLATFORM=irix-g++
|
|
|
|
PLATFORM=irix-cc
|
|
|
|
#PLATFORM=irix-cc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for IRIX: irix-g++ irix-cc-64
|
|
|
|
"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
HP-UX:*)
|
|
|
|
case "$UNAME_MACHINE" in
|
|
|
|
ia64)
|
|
|
|
#PLATFORM=hpuxi-acc-32
|
|
|
|
PLATFORM=hpuxi-acc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for HP-UXi: hpuxi-acc-32
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#PLATFORM=hpux-g++
|
|
|
|
PLATFORM=hpux-acc
|
|
|
|
#PLATFORM=hpux-acc-64
|
|
|
|
#PLATFORM=hpux-cc
|
|
|
|
#PLATFORM=hpux-acc-o64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
esac
|
2013-12-20 15:14:31 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
OSF1:*)
|
|
|
|
#PLATFORM=tru64-g++
|
|
|
|
PLATFORM=tru64-cxx
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Tru64: tru64-g++
|
|
|
|
"
|
2014-01-01 16:36:24 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
Linux:*)
|
|
|
|
PLATFORM=linux-g++
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
|
|
|
|
"
|
2015-07-04 14:13:31 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
SunOS:5*)
|
|
|
|
#PLATFORM=solaris-g++
|
|
|
|
PLATFORM=solaris-cc
|
|
|
|
#PLATFORM=solaris-cc64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Solaris: solaris-g++ solaris-cc-64
|
|
|
|
"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
ReliantUNIX-*:*|SINIX-*:*)
|
|
|
|
PLATFORM=reliant-cds
|
|
|
|
#PLATFORM=reliant-cds-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Reliant UNIX: reliant-cds-64
|
|
|
|
"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
CYGWIN*:*)
|
|
|
|
PLATFORM=cygwin-g++
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
LynxOS*:*)
|
|
|
|
PLATFORM=lynxos-g++
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
OpenUNIX:*)
|
|
|
|
#PLATFORM=unixware-g++
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for OpenUNIX: unixware-g++
|
|
|
|
"
|
2015-10-15 13:40:26 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
UnixWare:*)
|
|
|
|
#PLATFORM=unixware-g++
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for UnixWare: unixware-g++
|
|
|
|
"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
SCO_SV:*)
|
|
|
|
#PLATFORM=sco-g++
|
|
|
|
PLATFORM=sco-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for SCO OpenServer: sco-g++
|
|
|
|
"
|
2013-09-08 03:55:50 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
UNIX_SV:*)
|
|
|
|
PLATFORM=unixware-g++
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
QNX:*)
|
|
|
|
PLATFORM=unsupported/qnx-g++
|
2014-12-09 10:45:29 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*)
|
|
|
|
echo >&2
|
|
|
|
echo " The build script does not currently recognize all" >&2
|
|
|
|
echo " platforms supported by Qt." >&2
|
|
|
|
echo " Rerun this script with a -platform option listed to" >&2
|
|
|
|
echo " set the system/compiler combination you use." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
|
|
|
|
|
|
|
|
case "$XPLATFORM" in
|
|
|
|
*win32-g++*)
|
|
|
|
XPLATFORM_MINGW=yes
|
2013-04-11 08:51:49 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*qnx-*)
|
2014-12-11 22:32:59 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*haiku-*)
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*ios*)
|
|
|
|
XPLATFORM_MAC=yes
|
|
|
|
XPLATFORM_IOS=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*tvos*)
|
|
|
|
XPLATFORM_MAC=yes
|
|
|
|
XPLATFORM_TVOS=yes
|
2014-08-22 15:20:49 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*macx*)
|
|
|
|
XPLATFORM_MAC=yes
|
2015-01-27 17:41:32 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*integrity*)
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
|
|
|
|
*unsupported*)
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
*android-g++*)
|
|
|
|
XPLATFORM_ANDROID=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2016-06-11 20:49:01 +00:00
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check the license
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ "$COMMERCIAL_USER" = "ask" ]; then
|
|
|
|
while true; do
|
|
|
|
echo "Which edition of Qt do you want to use ?"
|
|
|
|
echo
|
|
|
|
echo "Type 'c' if you want to use the Commercial Edition."
|
|
|
|
echo "Type 'o' if you want to use the Open Source Edition."
|
|
|
|
echo
|
|
|
|
read commercial
|
|
|
|
echo
|
|
|
|
if [ "$commercial" = "c" ]; then
|
|
|
|
COMMERCIAL_USER="yes"
|
|
|
|
break
|
|
|
|
elif [ "$commercial" = "o" ]; then
|
|
|
|
COMMERCIAL_USER="no"
|
|
|
|
break
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
done
|
2015-08-07 12:28:14 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
|
|
|
|
# Commercial preview release
|
|
|
|
Licensee="Preview"
|
|
|
|
Edition="Preview"
|
|
|
|
EditionString="Technology Preview"
|
|
|
|
elif [ $COMMERCIAL_USER = "yes" ]; then
|
|
|
|
if [ $UNAME_SYSTEM = "Linux" ]; then
|
|
|
|
case "$PLATFORM" in
|
|
|
|
*-32)
|
|
|
|
Licheck=licheck32
|
|
|
|
;;
|
|
|
|
*-64)
|
|
|
|
Licheck=licheck64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if file -L /bin/sh | grep -q "64-bit" ; then
|
|
|
|
Licheck=licheck64
|
2014-02-05 15:25:06 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
Licheck=licheck32
|
2014-03-04 15:26:07 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
elif [ $UNAME_SYSTEM = "Darwin" ]; then
|
|
|
|
Licheck=licheck_mac
|
|
|
|
else
|
|
|
|
echo >&2 "Host operating system not supported by this edition of Qt."
|
|
|
|
exit 1
|
2013-11-19 15:53:21 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -x "$relpath/bin/$Licheck" ]; then
|
|
|
|
LicheckOutput=`$relpath/bin/$Licheck $OPT_CONFIRM_LICENSE $relpath $outpath\
|
|
|
|
$PLATFORM $XPLATFORM`
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
2014-02-06 11:10:11 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
eval "$LicheckOutput"
|
2014-02-06 11:10:11 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
echo
|
|
|
|
echo "Error: This is the Open Source version of Qt."
|
|
|
|
echo "If you want to use Enterprise features of Qt,"
|
|
|
|
echo "use the contact form at http://www.qt.io/contact-us"
|
|
|
|
echo "to purchase a license."
|
|
|
|
echo
|
|
|
|
exit 1
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
elif [ $COMMERCIAL_USER = "no" ]; then
|
|
|
|
# Open Source edition - may only be used under the terms of the LGPLv3 or GPLv2.
|
|
|
|
Licensee="Open Source"
|
|
|
|
Edition="OpenSource"
|
|
|
|
EditionString="Open Source"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$Edition" = "OpenSource" ] || [ "$Edition" = "Preview" ]; then
|
|
|
|
echo
|
|
|
|
echo "This is the Qt ${EditionString} Edition."
|
|
|
|
echo
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$Edition" = "OpenSource" ]; then
|
|
|
|
while true; do
|
|
|
|
if [ "$CFG_ANDROID_STYLE_ASSETS" = "no" ] || [ "$XPLATFORM_ANDROID" = "no" ]; then
|
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the GNU Lesser General Public License (LGPL) versions 3."
|
|
|
|
echo "You are also licensed to use this software under the terms of"
|
|
|
|
echo "the GNU General Public License (GPL) versions 2."
|
|
|
|
affix="either"
|
|
|
|
showGPL2="yes"
|
2015-03-02 15:09:22 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the GNU Lesser General Public License (LGPL) versions 3."
|
|
|
|
showGPL2="no"
|
|
|
|
affix="the"
|
2015-03-02 15:09:22 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
|
|
|
echo "You have already accepted the terms of the $EditionString license."
|
|
|
|
acceptance=yes
|
2015-10-13 14:07:19 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -f "$relpath/LICENSE.LGPL3" ]; then
|
|
|
|
echo "Type 'L' to view the GNU Lesser General Public License version 3."
|
|
|
|
fi
|
|
|
|
if [ "$showGPL2" = "yes" ]; then
|
|
|
|
echo "Type 'G' to view the GNU General Public License version 2."
|
|
|
|
fi
|
|
|
|
echo "Type 'yes' to accept this license offer."
|
|
|
|
echo "Type 'no' to decline this license offer."
|
|
|
|
echo
|
|
|
|
echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
|
|
|
|
read acceptance
|
2015-10-13 14:07:19 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
echo
|
|
|
|
if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
|
|
|
|
break
|
|
|
|
elif [ "$acceptance" = "no" ]; then
|
|
|
|
echo "You are not licensed to use this software."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
elif [ "$acceptance" = "L" ]; then
|
|
|
|
more "$relpath/LICENSE.LGPL3"
|
|
|
|
elif [ "$acceptance" = "G" ] && [ "$showGPL2" = "yes" ]; then
|
|
|
|
more "$relpath/LICENSE.GPL2"
|
2015-03-02 15:09:22 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
done
|
|
|
|
elif [ "$Edition" = "Preview" ]; then
|
|
|
|
TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
|
|
|
|
while true; do
|
|
|
|
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
|
|
|
echo "You have already accepted the terms of the $EditionString license."
|
|
|
|
acceptance=yes
|
2015-03-02 15:09:22 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the $TheLicense"
|
|
|
|
echo
|
|
|
|
echo "Type '?' to read the Preview License."
|
|
|
|
echo "Type 'yes' to accept this license offer."
|
|
|
|
echo "Type 'no' to decline this license offer."
|
|
|
|
echo
|
|
|
|
echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
|
|
|
|
read acceptance
|
2015-03-02 15:09:22 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
echo
|
|
|
|
if [ "$acceptance" = "yes" ]; then
|
|
|
|
break
|
|
|
|
elif [ "$acceptance" = "no" ] ;then
|
|
|
|
echo "You are not licensed to use this software."
|
|
|
|
echo
|
|
|
|
exit 0
|
|
|
|
elif [ "$acceptance" = "?" ]; then
|
|
|
|
more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
|
2015-10-29 13:11:29 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
done
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-06-01 09:00:58 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# command line and environment validation
|
|
|
|
#-------------------------------------------------------------------------------
|
2013-01-18 15:36:42 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$XPLATFORM_ANDROID" = "yes" ]; then
|
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
|
|
|
|
case $PLATFORM in
|
|
|
|
linux-*)
|
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
|
|
|
|
elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
macx-*)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86
|
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
win32-*)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=windows
|
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2012-05-10 21:52:05 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not find Android NDK. Please use -android-ndk option to specify one"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not find Android SDK. Please use -android-sdk option to specify one"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not detect the android host. Please use -android-ndk-host option to specify one"
|
|
|
|
exit 1
|
2012-04-18 22:57:00 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION"
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2013-03-14 15:35:23 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -d "$PLATFORM" ]; then
|
|
|
|
QMAKESPEC="$PLATFORM"
|
|
|
|
else
|
|
|
|
QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
|
2015-08-07 12:28:14 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -d "$XPLATFORM" ]; then
|
|
|
|
XQMAKESPEC="$XPLATFORM"
|
|
|
|
else
|
|
|
|
XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
|
2015-10-15 13:40:26 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
|
|
|
|
echo >&2
|
|
|
|
echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
|
|
|
|
echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2
|
|
|
|
echo " the 'macx-xcode' spec for your application, and it will link to" >&2
|
|
|
|
echo " the Qt/Mac build using the settings of the original mkspec." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# check specified platforms are supported
|
|
|
|
if [ '!' -d "$QMAKESPEC" ]; then
|
2014-01-29 15:46:47 +00:00
|
|
|
echo
|
2016-06-11 20:49:01 +00:00
|
|
|
echo " The specified system/compiler is not supported:"
|
2014-01-29 15:46:47 +00:00
|
|
|
echo
|
2016-06-11 20:49:01 +00:00
|
|
|
echo " $QMAKESPEC"
|
|
|
|
echo
|
|
|
|
echo " Please see the README file for a complete list."
|
|
|
|
echo
|
|
|
|
exit 2
|
2014-01-29 15:46:47 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ '!' -d "$XQMAKESPEC" ]; then
|
|
|
|
echo
|
|
|
|
echo " The specified system/compiler is not supported:"
|
|
|
|
echo
|
|
|
|
echo " $XQMAKESPEC"
|
|
|
|
echo
|
|
|
|
echo " Please see the README file for a complete list."
|
|
|
|
echo
|
|
|
|
exit 2
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
|
|
|
|
echo
|
|
|
|
echo " The specified system/compiler port is not complete:"
|
|
|
|
echo
|
|
|
|
echo " $XQMAKESPEC/qplatformdefs.h"
|
|
|
|
echo
|
|
|
|
echo " Please information use the contact form at http://www.qt.io/contact-us"
|
|
|
|
echo
|
|
|
|
exit 2
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build tree initialization
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# is this a shadow build?
|
|
|
|
if [ "$OPT_SHADOW" = "maybe" ]; then
|
|
|
|
OPT_SHADOW=no
|
|
|
|
if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
|
|
|
|
if [ -h "$outpath" ]; then
|
|
|
|
[ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
|
2012-10-25 19:38:13 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
OPT_SHADOW=yes
|
2012-10-25 19:38:13 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$OPT_SHADOW" = "yes" ]; then
|
|
|
|
if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
|
|
|
|
echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
|
|
|
|
echo >&2 "Cannot proceed."
|
|
|
|
exit 1
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
[ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# if the source tree is different from the build tree,
|
|
|
|
# symlink or copy part of the sources
|
|
|
|
if [ "$OPT_SHADOW" = "yes" ]; then
|
|
|
|
echo "Preparing build tree..."
|
2015-07-11 05:09:15 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
|
2015-10-15 13:04:17 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
mkdir -p "$outpath/mkspecs"
|
2015-08-06 08:24:34 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
|
|
|
|
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2014-08-22 15:20:49 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$XPLATFORM_ANDROID" != "yes" ]; then
|
|
|
|
TEST_COMPILER=`getXQMakeConf QMAKE_CXX`
|
|
|
|
GCC_MACHINE_DUMP=
|
|
|
|
case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
|
|
|
|
if [ -n "$GCC_MACHINE_DUMP" ]; then
|
|
|
|
DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
|
2012-01-23 22:31:13 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#setup the build parts
|
|
|
|
if [ -z "$CFG_BUILD_PARTS" ]; then
|
|
|
|
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
|
|
|
|
|
|
|
|
# build tests by default, if a developer build
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
|
2015-02-13 15:41:58 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# don't build tools by default when cross-compiling
|
|
|
|
if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
|
|
|
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed 's, tools,,g'`
|
Add color font support on Windows
Detect if DirectWrite 2 is available, and support color fonts if possible.
One limitation worth mentioning is that if the color font contains regular,
monochrome glyphs as well, then these will be drawn in black, and not in the
pen color. Fixing this would require some elaborate rewrites in the font
rendering system, since we would have to have two font caches per
color font (one for mono and one for colors), or do some sort of trick where
we make argb(r, g, b, 0) mean subpixel alpha instead, and detect glyphs that
are not correctly premultiplied when blitting to the screen.
Another limitation is that the approach does not work with distance field
rendering. In principle we could support this on Windows, since the
format is vector based, but it would also require substantial work and
it is not possible to support for Apple/Google fonts anyway, so it would
just lead to code which is not cross-platform.
[ChangeLog][Windows] Added support for color fonts (color emojis) when
DirectWrite 2 is available.
Change-Id: I6a608dd5d2aa3a7e762a06830902bddac7c550a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 14:52:28 +00:00
|
|
|
fi
|
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
for nobuild in $CFG_NOBUILD_PARTS; do
|
|
|
|
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
|
|
|
|
done
|
|
|
|
if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
|
|
|
|
# echo
|
|
|
|
# echo "WARNING: libs is a required part of the build."
|
|
|
|
# echo
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
|
|
|
|
fi
|
Add color font support on Windows
Detect if DirectWrite 2 is available, and support color fonts if possible.
One limitation worth mentioning is that if the color font contains regular,
monochrome glyphs as well, then these will be drawn in black, and not in the
pen color. Fixing this would require some elaborate rewrites in the font
rendering system, since we would have to have two font caches per
color font (one for mono and one for colors), or do some sort of trick where
we make argb(r, g, b, 0) mean subpixel alpha instead, and detect glyphs that
are not correctly premultiplied when blitting to the screen.
Another limitation is that the approach does not work with distance field
rendering. In principle we could support this on Windows, since the
format is vector based, but it would also require substantial work and
it is not possible to support for Apple/Google fonts anyway, so it would
just lead to code which is not cross-platform.
[ChangeLog][Windows] Added support for color fonts (color emojis) when
DirectWrite 2 is available.
Change-Id: I6a608dd5d2aa3a7e762a06830902bddac7c550a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 14:52:28 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
# postprocess installation and deployment paths
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_INSTALL_PREFIX" ]; then
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
|
|
|
|
else
|
|
|
|
QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
|
2015-07-09 00:21:30 +00:00
|
|
|
fi
|
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_INSTALL_PREFIX=`makeabs "$QT_INSTALL_PREFIX"`
|
2012-05-29 05:10:09 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_EXT_PREFIX" ]; then
|
|
|
|
QT_EXT_PREFIX=$QT_INSTALL_PREFIX
|
|
|
|
if [ -n "$CFG_SYSROOT" ]; then
|
|
|
|
QMAKE_SYSROOTIFY=true
|
|
|
|
else
|
|
|
|
QMAKE_SYSROOTIFY=false
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_EXT_PREFIX=`makeabs "$QT_EXT_PREFIX"`
|
|
|
|
QMAKE_SYSROOTIFY=false
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_HOST_PREFIX" ]; then
|
|
|
|
if $QMAKE_SYSROOTIFY; then
|
|
|
|
QT_HOST_PREFIX=$CFG_SYSROOT$QT_EXT_PREFIX
|
|
|
|
else
|
|
|
|
QT_HOST_PREFIX=$QT_EXT_PREFIX
|
|
|
|
fi
|
|
|
|
HAVE_HOST_PATH=false
|
2012-03-07 14:07:07 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_HOST_PREFIX=`makeabs "$QT_HOST_PREFIX"`
|
|
|
|
HAVE_HOST_PATH=true
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#------- make the paths relative to the prefixes --------
|
2014-02-06 11:10:11 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
PREFIX_COMPLAINTS=
|
|
|
|
PREFIX_REMINDER=false
|
|
|
|
while read basevar baseoption var option; do
|
|
|
|
eval path=\$QT_${basevar}_$var
|
|
|
|
[ -z "$path" ] && continue
|
|
|
|
path=`makeabs "$path"`
|
|
|
|
eval base=\$QT_${basevar}_PREFIX
|
|
|
|
rel=${path##$base}
|
|
|
|
if [ x"$rel" = x"$path" ]; then
|
|
|
|
if [ x"$option" != x"sysconf" ]; then
|
|
|
|
PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
|
|
|
|
NOTICE: -${option}dir is not a subdirectory of ${baseoption}prefix."
|
|
|
|
eval \$HAVE_${basevar}_PATH || PREFIX_REMINDER=true
|
|
|
|
fi
|
|
|
|
eval QT_REL_${basevar}_$var=\$rel
|
|
|
|
elif [ -z "$rel" ]; then
|
|
|
|
eval QT_REL_${basevar}_$var=.
|
|
|
|
else
|
|
|
|
eval QT_REL_${basevar}_$var=\${rel#/}
|
2015-10-29 13:11:29 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
done <<EOF
|
|
|
|
INSTALL - DOCS doc
|
|
|
|
INSTALL - HEADERS header
|
|
|
|
INSTALL - LIBS lib
|
|
|
|
INSTALL - LIBEXECS libexec
|
|
|
|
INSTALL - BINS bin
|
|
|
|
INSTALL - PLUGINS plugin
|
|
|
|
INSTALL - IMPORTS import
|
|
|
|
INSTALL - QML qml
|
|
|
|
INSTALL - ARCHDATA archdata
|
|
|
|
INSTALL - DATA data
|
|
|
|
INSTALL - TRANSLATIONS translation
|
|
|
|
INSTALL - EXAMPLES examples
|
|
|
|
INSTALL - TESTS tests
|
|
|
|
INSTALL - SETTINGS sysconf
|
|
|
|
HOST -host BINS hostbin
|
|
|
|
HOST -host LIBS hostlib
|
|
|
|
HOST -host DATA hostdata
|
|
|
|
EOF
|
|
|
|
$PREFIX_REMINDER && PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
|
|
|
|
Maybe you forgot to specify -prefix/-hostprefix?"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_HEADERS" ]; then
|
|
|
|
QT_REL_INSTALL_HEADERS=include
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_LIBS" ]; then
|
|
|
|
QT_REL_INSTALL_LIBS=lib
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_BINS" ]; then
|
|
|
|
QT_REL_INSTALL_BINS=bin
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_ARCHDATA" ]; then
|
|
|
|
QT_REL_INSTALL_ARCHDATA=.
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ x"$QT_REL_INSTALL_ARCHDATA" != x. ]; then
|
|
|
|
QT_REL_INSTALL_ARCHDATA_PREFIX=$QT_REL_INSTALL_ARCHDATA/
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_LIBEXECS" ]; then
|
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}bin
|
|
|
|
else
|
|
|
|
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}libexec
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_PLUGINS" ]; then
|
|
|
|
QT_REL_INSTALL_PLUGINS=${QT_REL_INSTALL_ARCHDATA_PREFIX}plugins
|
2011-10-24 11:00:49 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_IMPORTS" ]; then
|
|
|
|
QT_REL_INSTALL_IMPORTS=${QT_REL_INSTALL_ARCHDATA_PREFIX}imports
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_QML" ]; then
|
|
|
|
QT_REL_INSTALL_QML=${QT_REL_INSTALL_ARCHDATA_PREFIX}qml
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_DATA" ]; then
|
|
|
|
QT_REL_INSTALL_DATA=.
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ x"$QT_REL_INSTALL_DATA" != x. ]; then
|
|
|
|
QT_REL_INSTALL_DATA_PREFIX=$QT_REL_INSTALL_DATA/
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_DOCS" ]; then
|
|
|
|
QT_REL_INSTALL_DOCS=${QT_REL_INSTALL_DATA_PREFIX}doc
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_TRANSLATIONS" ]; then
|
|
|
|
QT_REL_INSTALL_TRANSLATIONS=${QT_REL_INSTALL_DATA_PREFIX}translations
|
2011-11-11 10:21:52 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_EXAMPLES" ]; then
|
|
|
|
QT_REL_INSTALL_EXAMPLES=examples
|
2015-10-29 13:59:59 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_TESTS" ]; then
|
|
|
|
QT_REL_INSTALL_TESTS=tests
|
|
|
|
fi
|
2014-09-30 07:50:22 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_SETTINGS" ]; then
|
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
|
|
|
QT_REL_INSTALL_SETTINGS=/Library/Preferences/Qt
|
|
|
|
else
|
|
|
|
QT_REL_INSTALL_SETTINGS=etc/xdg
|
2014-09-30 07:50:22 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
fi
|
2014-09-30 07:50:22 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#------- host paths --------
|
2014-09-30 07:50:22 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_HOST_BINS" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_BINS=bin
|
|
|
|
else
|
|
|
|
QT_REL_HOST_BINS=$QT_REL_INSTALL_BINS
|
2014-09-30 07:50:22 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
fi
|
2014-09-30 07:50:22 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_HOST_LIBS" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_LIBS=lib
|
|
|
|
else
|
|
|
|
QT_REL_HOST_LIBS=$QT_REL_INSTALL_LIBS
|
2014-09-30 07:50:22 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ -z "$QT_REL_HOST_DATA" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_DATA=.
|
|
|
|
else
|
|
|
|
QT_REL_HOST_DATA=$QT_REL_INSTALL_ARCHDATA
|
|
|
|
fi
|
2012-01-23 22:31:13 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
|
|
|
|
shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
|
2011-05-09 05:34:25 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_CONFIGURE_STR_OFF=0
|
2011-09-15 10:29:08 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
addConfStr()
|
|
|
|
{
|
|
|
|
QT_CONFIGURE_STR_OFFSETS="$QT_CONFIGURE_STR_OFFSETS $QT_CONFIGURE_STR_OFF,"
|
|
|
|
QT_CONFIGURE_STRS="$QT_CONFIGURE_STRS \"$1\\0\"
|
|
|
|
"
|
|
|
|
count=`echo "$1" | wc -c`
|
|
|
|
QT_CONFIGURE_STR_OFF=`expr $QT_CONFIGURE_STR_OFF + $count`
|
|
|
|
}
|
2011-09-15 10:29:08 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_CONFIGURE_STR_OFFSETS=
|
|
|
|
QT_CONFIGURE_STRS=
|
|
|
|
addConfStr "$QT_REL_INSTALL_DOCS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_HEADERS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_LIBS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_LIBEXECS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_BINS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_PLUGINS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_IMPORTS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_QML"
|
|
|
|
addConfStr "$QT_REL_INSTALL_ARCHDATA"
|
|
|
|
addConfStr "$QT_REL_INSTALL_DATA"
|
|
|
|
addConfStr "$QT_REL_INSTALL_TRANSLATIONS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_EXAMPLES"
|
|
|
|
addConfStr "$QT_REL_INSTALL_TESTS"
|
|
|
|
QT_CONFIGURE_STR_OFFSETS_ALL=$QT_CONFIGURE_STR_OFFSETS
|
|
|
|
QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS
|
2015-09-28 18:19:36 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_CONFIGURE_STR_OFFSETS=
|
|
|
|
QT_CONFIGURE_STRS=
|
|
|
|
addConfStr "$CFG_SYSROOT"
|
|
|
|
addConfStr "$QT_REL_HOST_BINS"
|
|
|
|
addConfStr "$QT_REL_HOST_LIBS"
|
|
|
|
addConfStr "$QT_REL_HOST_DATA"
|
|
|
|
addConfStr "$shortxspec"
|
|
|
|
addConfStr "$shortspec"
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
# generate qconfig.cpp
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
|
|
/* Installation date */
|
|
|
|
static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
/* Installation Info */
|
|
|
|
static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_INSTALL_PREFIX";
|
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
static const char qt_configure_ext_prefix_path_str [256 + 12] = "qt_epfxpath=$QT_EXT_PREFIX";
|
|
|
|
static const char qt_configure_host_prefix_path_str [256 + 12] = "qt_hpfxpath=$QT_HOST_PREFIX";
|
|
|
|
#endif
|
2015-09-18 01:17:40 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
static const short qt_configure_str_offsets[] = {
|
|
|
|
$QT_CONFIGURE_STR_OFFSETS_ALL
|
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
$QT_CONFIGURE_STR_OFFSETS
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
static const char qt_configure_strs[] =
|
|
|
|
$QT_CONFIGURE_STRS_ALL#ifdef QT_BUILD_QMAKE
|
|
|
|
$QT_CONFIGURE_STRS#endif
|
|
|
|
;
|
2015-09-18 01:17:40 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#define QT_CONFIGURE_SETTINGS_PATH "$QT_REL_INSTALL_SETTINGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
# define QT_CONFIGURE_SYSROOTIFY_PREFIX $QMAKE_SYSROOTIFY
|
2012-05-30 10:09:00 +00:00
|
|
|
#endif
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
|
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
|
|
|
|
# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
|
|
|
|
#endif
|
2012-05-30 10:09:00 +00:00
|
|
|
EOF
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# avoid unecessary rebuilds by copying only if qconfig.cpp has changed
|
|
|
|
if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
|
|
|
|
rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
|
|
|
|
else
|
|
|
|
[ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
|
|
|
|
mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
|
|
|
|
chmod -w "$outpath/src/corelib/global/qconfig.cpp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-10-01 10:34:20 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# build qmake
|
|
|
|
# -----------------------------------------------------------------------------
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# symlink includes
|
|
|
|
if [ -e "$relpath/.git" ]; then
|
|
|
|
if [ -z "$PERL" ]; then
|
|
|
|
echo
|
|
|
|
echo "You need perl in your PATH to make a build from GIT."
|
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-09-08 23:35:33 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
"$relpath/bin/syncqt.pl" -version $QT_VERSION -minimal -module QtCore "$relpath" || exit 1
|
2012-01-29 12:54:19 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# $1: input variable name (awk regexp)
|
|
|
|
# $2: optional output variable name
|
|
|
|
# $3: optional value transformation (sed command)
|
|
|
|
# relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
|
|
|
|
# is where the resulting variable is written to
|
|
|
|
setBootstrapVariable()
|
|
|
|
{
|
|
|
|
getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
|
|
|
|
}
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# build qmake
|
|
|
|
if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
|
|
|
echo "Creating qmake..."
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
mkdir -p "$outpath/qmake" || exit
|
|
|
|
# fix makefiles
|
|
|
|
for mkfile in GNUmakefile Makefile; do
|
|
|
|
EXTRA_LFLAGS=
|
|
|
|
EXTRA_CFLAGS=
|
|
|
|
in_mkfile="${mkfile}.in"
|
|
|
|
if [ "$mkfile" = "Makefile" ]; then
|
|
|
|
# if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
|
|
|
|
# (cd qmake && qmake) >/dev/null 2>&1 && continue
|
|
|
|
# fi
|
|
|
|
in_mkfile="${mkfile}.unix"
|
|
|
|
fi
|
|
|
|
in_mkfile="$relpath/qmake/$in_mkfile"
|
|
|
|
mkfile="$outpath/qmake/$mkfile"
|
|
|
|
if [ -f "$mkfile" ]; then
|
|
|
|
[ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
|
|
|
|
rm -f "$mkfile"
|
|
|
|
fi
|
|
|
|
[ -f "$in_mkfile" ] || continue
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
echo "########################################################################" > "$mkfile"
|
|
|
|
echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
|
|
|
|
echo "########################################################################" >> "$mkfile"
|
|
|
|
EXTRA_OBJS=
|
|
|
|
EXTRA_SRCS=
|
|
|
|
EXTRA_CFLAGS="\$(QMAKE_CFLAGS) \$(QMAKE_CFLAGS_SPLIT_SECTIONS)"
|
|
|
|
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX11) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)"
|
|
|
|
EXTRA_LFLAGS="\$(QMAKE_LFLAGS) \$(QMAKE_LFLAGS_GCSECTIONS)"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
[ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
|
|
|
|
setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
|
|
|
|
setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
|
|
|
|
setBootstrapVariable QMAKE_CFLAGS
|
|
|
|
setBootstrapVariable QMAKE_CFLAGS_SPLIT_SECTIONS
|
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS
|
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_CXX11
|
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
|
|
|
|
setBootstrapVariable QMAKE_LFLAGS
|
|
|
|
setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$CFG_DEBUG" = "no" ] || [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
|
|
|
|
setBootstrapVariable QMAKE_CFLAGS_RELEASE
|
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
|
|
|
|
else
|
|
|
|
setBootstrapVariable QMAKE_CFLAGS_DEBUG
|
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
case `basename "$PLATFORM"` in
|
|
|
|
win32-g++*)
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS -DUNICODE"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DUNICODE"
|
|
|
|
EXTRA_OBJS="qfilesystemengine_win.o \
|
|
|
|
qfilesystemiterator_win.o \
|
|
|
|
qfsfileengine_win.o \
|
|
|
|
qlocale_win.o \
|
|
|
|
qsettings_win.o \
|
|
|
|
qsystemlibrary.o \
|
|
|
|
registry.o"
|
|
|
|
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/corelib/io/qfilesystemengine_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\""
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS -static -s -lole32 -luuid -ladvapi32 -lkernel32"
|
|
|
|
EXEEXT=".exe"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
EXTRA_OBJS="qfilesystemengine_unix.o \
|
|
|
|
qfilesystemiterator_unix.o \
|
|
|
|
qfsfileengine_unix.o \
|
|
|
|
qlocale_unix.o"
|
|
|
|
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\""
|
|
|
|
EXEEXT=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
|
|
|
|
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
|
|
|
|
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(COCOA_LFLAGS)"
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
|
|
|
|
EXTRA_OBJS="$EXTRA_OBJS \
|
|
|
|
qsettings_mac.o \
|
|
|
|
qcore_mac.o \
|
|
|
|
qcore_mac_objc.o"
|
|
|
|
EXTRA_SRCS="$EXTRA_SRCS \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm\""
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo >>"$mkfile"
|
|
|
|
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
|
|
|
|
echo "BUILD_PATH = .." >> "$mkfile"
|
|
|
|
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
|
|
|
|
if [ -e "$relpath/.git" ]; then
|
|
|
|
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
|
|
|
|
else
|
|
|
|
echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile"
|
|
|
|
fi
|
|
|
|
echo "QMAKESPEC = $adjqmakespec" >> "$mkfile"
|
|
|
|
echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
|
|
|
|
echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile"
|
|
|
|
echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile"
|
|
|
|
echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile"
|
|
|
|
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"
|
|
|
|
echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile"
|
|
|
|
echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile"
|
|
|
|
echo "QTSRCS =" $EXTRA_SRCS >> "$mkfile"
|
|
|
|
echo "LFLAGS = $EXTRA_LFLAGS" >> "$mkfile"
|
|
|
|
echo "EXEEXT = $EXEEXT" >> "$mkfile"
|
|
|
|
echo "RM_F = rm -f" >> "$mkfile"
|
|
|
|
echo "RM_RF = rm -rf" >> "$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
echo "EXTRA_CXXFLAGS += -MMD" >> "$mkfile"
|
|
|
|
cat "$in_mkfile" >> "$mkfile"
|
|
|
|
echo "-include \$(notdir \$(DEPEND_SRC:%.cpp=%.d))" >> "$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
cat "$in_mkfile" >> "$mkfile"
|
|
|
|
if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
|
|
|
|
(cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
|
|
|
|
sed 's,^.*/\([^/]*.o\):,\1:,g' "$mkfile" >"$mkfile.tmp"
|
|
|
|
sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
|
|
|
|
rm "$mkfile.tmp"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ "$OPT_VERBOSE" = yes ]; then
|
|
|
|
# Show the output of make
|
|
|
|
(cd "$outpath/qmake"; "$MAKE") || exit 2
|
|
|
|
else
|
|
|
|
# Hide the output of make
|
|
|
|
# Use bash to print dots, if we have it, and stdout is a tty.
|
|
|
|
if test -t 1 && $WHICH bash > /dev/null 2>/dev/null; then
|
|
|
|
bash -c 'set -o pipefail
|
|
|
|
cd "$0/qmake"; "$1" | while read line; do
|
|
|
|
builtin echo -n .
|
|
|
|
done' "$outpath" "$MAKE" || exit 2
|
|
|
|
else
|
|
|
|
(cd "$outpath/qmake"; "$MAKE" -s) || exit 2
|
|
|
|
fi
|
|
|
|
echo "Done."
|
|
|
|
fi
|
|
|
|
fi # Build qmake
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# create a qt.conf for the Qt build tree itself
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QTCONFFILE="$outpath/bin/qt.conf"
|
|
|
|
cat > "$QTCONFFILE" <<EOF
|
|
|
|
[EffectivePaths]
|
|
|
|
Prefix=..
|
|
|
|
EOF
|
|
|
|
if [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
|
|
|
[Paths]
|
|
|
|
Prefix=$QT_EXT_PREFIX
|
|
|
|
Documentation=$QT_REL_INSTALL_DOCS
|
|
|
|
Headers=$QT_REL_INSTALL_HEADERS
|
|
|
|
Libraries=$QT_REL_INSTALL_LIBS
|
|
|
|
LibraryExecutables=$QT_REL_INSTALL_LIBEXECS
|
|
|
|
Binaries=$QT_REL_INSTALL_BINS
|
|
|
|
Plugins=$QT_REL_INSTALL_PLUGINS
|
|
|
|
Imports=$QT_REL_INSTALL_IMPORTS
|
|
|
|
Qml2Imports=$QT_REL_INSTALL_QML
|
|
|
|
ArchData=$QT_REL_INSTALL_ARCHDATA
|
|
|
|
Data=$QT_REL_INSTALL_DATA
|
|
|
|
Translations=$QT_REL_INSTALL_TRANSLATIONS
|
|
|
|
Examples=$QT_REL_INSTALL_EXAMPLES
|
|
|
|
Tests=$QT_REL_INSTALL_TESTS
|
|
|
|
HostPrefix=$QT_HOST_PREFIX
|
|
|
|
HostBinaries=$QT_REL_HOST_BINS
|
|
|
|
HostLibraries=$QT_REL_HOST_LIBS
|
|
|
|
HostData=$QT_REL_HOST_DATA
|
|
|
|
TargetSpec=$XPLATFORM
|
|
|
|
HostSpec=$PLATFORM
|
|
|
|
EOF
|
|
|
|
if [ -n "$CFG_SYSROOT" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
|
|
|
Sysroot=$CFG_SYSROOT
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
2016-06-11 20:49:01 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-06-11 20:49:01 +00:00
|
|
|
if [ x"$relpath" != x"$outpath" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
|
|
|
[EffectiveSourcePaths]
|
|
|
|
Prefix=$relpath
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
[ -z "$CFG_HOST_QT_TOOLS_PATH" ] && CFG_HOST_QT_TOOLS_PATH="$outpath/bin"
|
|
|
|
CFG_QMAKE_PATH="$CFG_HOST_QT_TOOLS_PATH/qmake"
|
2012-04-18 22:57:00 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# write out device config before we run the test.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
|
|
|
|
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
|
|
|
|
rm -f "$DEVICE_VARS_FILE"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
|
|
|
|
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2010-11-11 15:35:09 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
# write out host config.
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
HOST_VARS_OUTFILE="$outpath/mkspecs/qhost.pri"
|
|
|
|
if cmp -s "$HOST_VARS_FILE" "$HOST_VARS_OUTFILE"; then
|
|
|
|
rm -f "$HOST_VARS_FILE"
|
2012-12-22 21:12:02 +00:00
|
|
|
else
|
2016-06-11 20:49:01 +00:00
|
|
|
mv -f $HOST_VARS_FILE "$HOST_VARS_OUTFILE"
|
|
|
|
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
|
2015-05-22 13:02:23 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Verify makespec
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
|
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "Failed to process makespec for platform '$XPLATFORM'"
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo "$QMAKE_OUTPUT"
|
|
|
|
else
|
|
|
|
echo "Turn on verbose messaging (-v) to see the final report."
|
|
|
|
fi
|
|
|
|
exit 101
|
2012-12-10 14:11:47 +00:00
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-06-11 20:49:01 +00:00
|
|
|
# run configure tests
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# copy some variables that are still being computed in the shell script into an input file for configure
|
|
|
|
# This should go away in the future
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-29 09:39:27 +00:00
|
|
|
cat > "$outpath/config.tests/configure.cfg" <<EOF
|
|
|
|
# Feature defaults set by configure command line
|
2016-06-11 20:49:01 +00:00
|
|
|
config.input.qt_build_parts = $CFG_BUILD_PARTS
|
|
|
|
config.input.extra_features = $CFG_FEATURES
|
|
|
|
config.input.qt_edition = $Edition
|
|
|
|
config.input.qt_licheck = $Licheck
|
|
|
|
config.input.qt_release_date = $ReleaseDate
|
|
|
|
config.input.sysroot = $CFG_SYSROOT
|
2013-04-10 10:57:06 +00:00
|
|
|
EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# create a clean qmodule/qconfig.pri for running the tests
|
|
|
|
# .qmake.cache loads qt_build_parts which requires that qmodule.pri exists
|
|
|
|
for arg in qconfig qmodule; do
|
|
|
|
file="$outpath/mkspecs/$arg.pri"
|
|
|
|
[ ! -f "$file.old" ] && [ -f "$file" ] && mv "$file" "$file.old"
|
|
|
|
: > "$file"
|
|
|
|
done
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# recreate command line for qmake
|
|
|
|
set -f
|
|
|
|
SAVED_IFS=$IFS
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
for i in $QMAKE_CMDLINE; do
|
|
|
|
set -- "$@" "$i"
|
|
|
|
done
|
|
|
|
set +f
|
|
|
|
IFS=$SAVED_IFS
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# redirect qmake's output to a dummy Makefile
|
2016-06-29 09:39:27 +00:00
|
|
|
$CFG_QMAKE_PATH -o Makefile.cfg -qtconf "$QTCONFFILE" $relpath/configure.pri -- "$@" || exit 101
|
2016-06-11 20:49:01 +00:00
|
|
|
rm Makefile.cfg
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# Re-use old file if unchanged, to avoid needless rebuilds
|
|
|
|
for arg in qconfig qmodule; do
|
|
|
|
file="$outpath/mkspecs/$arg.pri"
|
|
|
|
if cmp -s "$file" "$file.old"; then
|
|
|
|
rm -f "$file"
|
|
|
|
mv "$file.old" "$file"
|
|
|
|
else
|
|
|
|
rm -f "$file.old"
|
|
|
|
fi
|
|
|
|
done
|
2010-11-11 15:35:09 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# give feedback on configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ -n "$PLATFORM_NOTES" ]; then
|
2016-06-11 20:49:01 +00:00
|
|
|
echo
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "Platform notes:"
|
|
|
|
echo "$PLATFORM_NOTES"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo $ECHO_N "qmake vars .......... $ECHO_C"
|
|
|
|
cat "$QMAKE_VARS_FILE" | tr '\n' ' '
|
2013-02-26 23:37:14 +00:00
|
|
|
echo
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
|
|
|
|
PROCS=1
|
|
|
|
EXEC=""
|
|
|
|
|
2012-11-29 08:38:05 +00:00
|
|
|
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build makefiles based on the configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2013-06-18 13:11:11 +00:00
|
|
|
( # fork to make the cd stay local
|
|
|
|
|
|
|
|
relpathMangled=$relpath
|
|
|
|
if [ -n "$CFG_TOPLEVEL" ]; then
|
|
|
|
relpathMangled=`dirname "$relpath"`
|
|
|
|
cd ..
|
|
|
|
fi
|
2012-08-02 13:37:50 +00:00
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" "$relpathMangled"
|
2013-06-18 13:11:11 +00:00
|
|
|
|
2014-06-19 10:12:51 +00:00
|
|
|
) || exit
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# finally save the executed command to another script
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ `basename $0` != "config.status" ]; then
|
2014-11-18 19:21:09 +00:00
|
|
|
CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# add the system variables
|
|
|
|
for varname in $SYSTEM_VARIABLES; do
|
|
|
|
cmd=`echo \
|
|
|
|
'if [ -n "\$'${varname}'" ]; then
|
|
|
|
CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
|
|
|
|
fi'`
|
|
|
|
eval "$cmd"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
|
|
|
|
|
|
|
|
[ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
|
|
|
|
echo "#!/bin/sh" > "$outpath/config.status"
|
2011-08-30 19:42:39 +00:00
|
|
|
[ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
|
|
|
|
echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
|
|
|
|
[ -n "$PKG_CONFIG_LIBDIR" ] && \
|
|
|
|
echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
|
2014-11-18 19:11:08 +00:00
|
|
|
echo "$CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
|
2011-04-27 10:05:43 +00:00
|
|
|
chmod +x "$outpath/config.status"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$RPATH_MESSAGE" ]; then
|
|
|
|
echo
|
|
|
|
echo "$RPATH_MESSAGE"
|
|
|
|
fi
|
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -n "$PREFIX_COMPLAINTS" ]; then
|
|
|
|
echo
|
|
|
|
echo "$PREFIX_COMPLAINTS"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
MAKE=`basename "$MAKE"`
|
|
|
|
echo
|
|
|
|
echo Qt is now configured for building. Just run \'$MAKE\'.
|
2013-06-14 15:37:56 +00:00
|
|
|
if [ "$outpath" = "$QT_INSTALL_PREFIX" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo Once everything is built, Qt is installed.
|
|
|
|
echo You should not run \'$MAKE install\'.
|
|
|
|
else
|
|
|
|
echo Once everything is built, you must run \'$MAKE install\'.
|
|
|
|
echo Qt will be installed into $QT_INSTALL_PREFIX
|
|
|
|
fi
|
|
|
|
echo
|
2013-04-17 22:05:05 +00:00
|
|
|
echo Prior to reconfiguration, make sure you remove any leftovers from
|
|
|
|
echo the previous build.
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|