Change syncqt default parameters for shadow building
authorKalle Juhani Lehtonen <kalle.ju.lehtonen@nokia.com>
Mon, 23 Jan 2012 07:27:06 +0000 (17:27 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 01:12:39 +0000 (02:12 +0100)
For shadow builds configure creates syncqt script to shadow build
directory tree calling the original syncqt from qtbase source tree.
This wrapped script will add two default parameters when calling
the original script. Both parameters are overridden in
qtbase/mkspecs/features/default_pre.prf and are not needed except by
configure script itself in latter stages where the parameter should be
applied explicitly in shadow build condition branch.

In addition, it adds the qtdir parameter for the forwarded syncqt call to
indicate the location of qt sources for the syncqt. This also will give
correct qmake path for qtmodule-configtests script triggered from syncqt.

Changes are done both for Linux and Windows configure.

Change-Id: I307b2e76c203ee14b849f10ff629f9668da2f223
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
configure
tools/configure/configureapp.cpp

index 4de2171..8b92585 100755 (executable)
--- a/configure
+++ b/configure
@@ -2323,7 +2323,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
     if [ -x "$relpath/bin/syncqt" ]; then
         mkdir -p "$outpath/bin"
         echo "#!/bin/sh" >"$outpath/bin/syncqt"
-        echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
+        echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
         chmod 755 "$outpath/bin/syncqt"
     fi
 
@@ -4385,7 +4385,7 @@ if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
     SYNCQT_OPTS=
     [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
     if [ "$OPT_SHADOW" = "yes" ]; then
-        "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
+        "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
     elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
         QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
     fi
index 3a42d13..2f5a7b5 100644 (file)
@@ -188,7 +188,7 @@ Configure::Configure(int& argc, char** argv)
             if (syncqt_bat.open(QFile::WriteOnly)) {
                 QTextStream stream(&syncqt_bat);
                 stream << "@echo off" << endl
-                       << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/syncqt.bat -outdir \"") << fixSeparators(buildPath) << "\" \"" << fixSeparators(sourcePath) << "\"" << endl;
+                       << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/syncqt.bat -qtdir \"") << fixSeparators(buildPath) << "\" %*" << endl;
                 syncqt_bat.close();
             }
         }
@@ -3091,6 +3091,7 @@ void Configure::generateHeaders()
             cout << "Running syncqt..." << endl;
             QStringList args;
             args += buildPath + "/bin/syncqt.bat";
+            args += sourcePath;
             QStringList env;
             env += QString("QTDIR=" + sourcePath);
             env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH"));