don't compile the host tools for wince already in configure

qmake can now produce proper mixed-target projects

Change-Id: I797f055f6e1487b9aefb75eee91d6c2cc4e6e56e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-06-22 19:52:41 +02:00 committed by Qt by Nokia
parent 9315497d2a
commit 989cada8cc
5 changed files with 3 additions and 74 deletions

View File

@ -9,6 +9,7 @@ src_winmain.depends = sub-corelib # just for the module .pri file
src_corelib.subdir = $$PWD/corelib
src_corelib.target = sub-corelib
src_corelib.depends = src_tools
src_xml.subdir = $$PWD/xml
src_xml.target = sub-xml
@ -59,11 +60,7 @@ src_plugins.target = sub-plugins
src_plugins.depends = src_sql src_xml src_network src_platformsupport
# this order is important
!wince* {
SUBDIRS += src_tools
src_corelib.depends += src_tools
}
SUBDIRS += src_corelib
SUBDIRS += src_tools src_corelib
win32:SUBDIRS += src_winmain
SUBDIRS += src_network src_sql src_xml src_testlib
contains(QT_CONFIG, dbus) {

View File

@ -21,7 +21,7 @@ contains(QT_CONFIG, dbus) {
src_tools_qdbuscpp2xml.target = sub-qdbuscpp2xml
}
!wince*:!ordered {
!ordered {
# Set dependencies for each subdir
src_tools_moc.depends = src_tools_bootstrap
src_tools_rcc.depends = src_tools_bootstrap

View File

@ -3641,71 +3641,6 @@ void Configure::buildQmake()
}
#endif
void Configure::buildHostTools()
{
if (dictionary[ "NOPROCESS" ] == "yes")
dictionary[ "DONE" ] = "yes";
if (!dictionary.contains("XQMAKESPEC"))
return;
QString pwd = QDir::currentPath();
QStringList hostToolsDirs;
hostToolsDirs
<< "src/tools";
for (int i = 0; i < hostToolsDirs.count(); ++i) {
cout << "Creating " << hostToolsDirs.at(i) << " ..." << endl;
QString toolBuildPath = buildPath + "/" + hostToolsDirs.at(i);
QString toolSourcePath = sourcePath + "/" + hostToolsDirs.at(i);
// generate Makefile
QStringList args;
args << QDir::toNativeSeparators(buildPath + "/bin/qmake");
// override .qmake.cache because we are not cross-building these.
// we need a full path so that a build with -prefix will still find it.
args << "-spec" << QDir::toNativeSeparators(buildPath + "/mkspecs/" + dictionary["QMAKESPEC"]);
args << "-r";
args << "-o" << QDir::toNativeSeparators(toolBuildPath + "/Makefile");
QDir().mkpath(toolBuildPath);
QDir::setCurrent(toolSourcePath);
int exitCode = Environment::execute(args, QStringList(), QStringList());
if (exitCode) {
cout << "qmake failed, return code " << exitCode << endl << endl;
dictionary["DONE"] = "error";
break;
}
// build app
args.clear();
args += dictionary["MAKE"];
QDir::setCurrent(toolBuildPath);
exitCode = Environment::execute(args, QStringList(), QStringList());
if (exitCode) {
args.clear();
args += dictionary["MAKE"];
args += "clean";
exitCode = Environment::execute(args, QStringList(), QStringList());
if (exitCode) {
cout << "Cleaning " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl;
dictionary["DONE"] = "error";
break;
} else {
args.clear();
args += dictionary["MAKE"];
exitCode = Environment::execute(args, QStringList(), QStringList());
if (exitCode) {
cout << "Building " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl;
dictionary["DONE"] = "error";
break;
}
}
}
}
QDir::setCurrent(pwd);
}
void Configure::findProjects(const QString& dirName)
{
if (dictionary[ "NOPROCESS" ] == "no") {

View File

@ -74,7 +74,6 @@ public:
void generateCachefile();
void displayConfig();
void buildQmake();
void buildHostTools();
#endif
void generateMakefiles();
void appendMakeItem(int inList, const QString &item);

View File

@ -101,8 +101,6 @@ int runConfigure( int argc, char** argv )
#endif
if( !app.isDone() )
app.generateMakefiles();
if( !app.isDone() )
app.buildHostTools();
if( !app.isDone() )
app.showSummary();
if( !app.isOk() )