summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/Makefile.win323
-rw-r--r--tools/configure/configureapp.cpp51
-rw-r--r--tools/configure/configureapp.h1
3 files changed, 28 insertions, 27 deletions
diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32
index 92de55f137..d2193d7619 100644
--- a/tools/configure/Makefile.win32
+++ b/tools/configure/Makefile.win32
@@ -65,7 +65,8 @@ OBJECTS = \
qxmlutils.obj \
quuid.obj \
qcryptographichash.obj \
- registry.obj
+ registry.obj \
+ configure_pch.obj
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) /OUT:$(TARGET) @<<
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 504728abc8..a586821bdc 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1158,11 +1158,7 @@ void Configure::parseCmdLine()
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32";
} else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make";
- if (Environment::detectExecutable("sh.exe")) {
- dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-sh";
- } else {
- dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++";
- }
+ dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++";
} else {
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "make";
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32";
@@ -2681,6 +2677,29 @@ QString Configure::addDefine(QString def)
}
#if !defined(EVAL)
+bool Configure::copySpec(const char *name, const char *pfx, const QString &spec)
+{
+ // Copy configured mkspec to default directory, but remove the old one first, if there is any
+ QString defSpec = buildPath + "/mkspecs/" + name;
+ QFileInfo defSpecInfo(defSpec);
+ if (defSpecInfo.exists()) {
+ if (!Environment::rmdir(defSpec)) {
+ cout << "Couldn't update default " << pfx << "mkspec! Are files in " << qPrintable(defSpec) << " read-only?" << endl;
+ dictionary["DONE"] = "error";
+ return false;
+ }
+ }
+
+ QString pltSpec = sourcePath + "/mkspecs/" + spec;
+ QString includeSpec = buildPath + "/mkspecs/" + spec;
+ if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) {
+ cout << "Couldn't update default " << pfx << "mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ dictionary["DONE"] = "error";
+ return false;
+ }
+ return true;
+}
+
void Configure::generateConfigfiles()
{
QDir(buildPath).mkpath("src/corelib/global");
@@ -2728,10 +2747,6 @@ void Configure::generateConfigfiles()
tmpStream << "#define QT_BUILD_INTERNAL" << endl;
tmpStream << endl;
}
- tmpStream << "/* Machine byte-order */" << endl;
- tmpStream << "#define Q_BIG_ENDIAN 4321" << endl;
- tmpStream << "#define Q_LITTLE_ENDIAN 1234" << endl;
- tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl;
if (dictionary[ "QPA" ] == "yes")
tmpStream << endl << "#define Q_WS_QPA" << endl;
@@ -2864,25 +2879,9 @@ void Configure::generateConfigfiles()
tmpFile.close();
}
- // Copy configured mkspec to default directory, but remove the old one first, if there is any
- QString defSpec = buildPath + "/mkspecs/default";
- QFileInfo defSpecInfo(defSpec);
- if (defSpecInfo.exists()) {
- if (!Environment::rmdir(defSpec)) {
- cout << "Couldn't update default mkspec! Are files in " << qPrintable(defSpec) << " read-only?" << endl;
- dictionary["DONE"] = "error";
- return;
- }
- }
-
QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
- QString pltSpec = sourcePath + "/mkspecs/" + spec;
- QString includeSpec = buildPath + "/mkspecs/" + spec;
- if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) {
- cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
- dictionary["DONE"] = "error";
+ if (!copySpec("default", "", spec))
return;
- }
// Generate the new qconfig.cpp file
QDir(buildPath).mkpath("src/corelib/global");
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index c3838fb139..58544b5041 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -79,6 +79,7 @@ public:
void generateMakefiles();
void appendMakeItem(int inList, const QString &item);
#if !defined(EVAL)
+ bool copySpec(const char *name, const char *pfx, const QString &spec);
void generateConfigfiles();
#endif
void showSummary();