summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-01-31 18:36:18 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:37:49 +0200
commit14bbab09c158e3eb54169b42c4a303d396a32f0e (patch)
treefd4706e980c1440eb6b91868d71979060af2398c /configure
parent528192a78b3250964ee99efab42b6683da02eb11 (diff)
introduce ability to build projects for the host system
when qmake runs into the new option(host_build) command, it will restart the project evaluation with a host spec. the new default host spec is called default-host (gasp!). it is overridden with the pre-exising -spec / -platform option, while the new -xspec / -xplatform option overrides the pre-existing default spec. specifying -spec but not -xspec will set the xspec, too, so the behavior is backwards-compatible. same for the XQMAKESPEC override read from .qmake.cache and the environment variable. the cleaner solution would be adding -hostspec, to be symmetrical with the override semantics, but that would deviate from configure in turn. Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure b/configure
index 1bb7bb9bf6..a4180bccc4 100755
--- a/configure
+++ b/configure
@@ -3491,8 +3491,9 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
- rm -rf mkspecs/default
+ rm -rf mkspecs/default mkspecs/default-host
ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+ ln -s `echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default-host
mkdir -p "$outpath/qmake" || exit
# fix makefiles
for mkfile in GNUmakefile Makefile; do
@@ -5906,9 +5907,14 @@ EOF
#dump the qmake spec
if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
- echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
+ echo "XQMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
else
- echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
+ echo "XQMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
+fi
+if [ -d "$outpath/mkspecs/$PLATFORM" ]; then
+ echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$PLATFORM" >> "$CACHEFILE.tmp"
+else
+ echo "QMAKESPEC = $PLATFORM" >> "$CACHEFILE.tmp"
fi
# replace .qmake.cache if it differs from the newly created temp file