summaryrefslogtreecommitdiff
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp49
1 files changed, 39 insertions, 10 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a83f451b81..f92fad1d69 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -151,12 +151,6 @@ Configure::Configure(int& argc, char** argv)
const QString installPath = buildPath;
#endif
if (sourceDir != buildDir) { //shadow builds!
- if (QStandardPaths::findExecutable(QStringLiteral("perl.exe")).isEmpty()) {
- cout << "Error: Creating a shadow build of Qt requires" << endl
- << "perl to be in the PATH environment";
- exit(0); // Exit cleanly for Ctrl+C
- }
-
cout << "Preparing build tree..." << endl;
QDir(buildPath).mkpath("bin");
@@ -1841,7 +1835,7 @@ bool Configure::displayHelp()
desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake.");
desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n");
- desc("PROCESS", "partial", "-process", "Generate top-level Makefiles/Project files.");
+ desc("PROCESS", "partial", "-process", "Generate only top-level Makefile.");
desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt\ntree.");
desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files.\n");
@@ -1987,7 +1981,7 @@ QString Configure::defaultTo(const QString &option)
return "auto";
if (option == "SYNCQT"
- && (!QFile::exists(sourcePath + "/bin/syncqt.pl")))
+ && (!QFile::exists(sourcePath + "/.git")))
return "no";
// Do not actually build the examples in production builds with -prefix, unless requested
@@ -3351,6 +3345,37 @@ void Configure::generateConfigfiles()
tmpFile.close();
}
+ QTemporaryFile tmpFile2;
+ if (tmpFile2.open()) {
+ tmpStream.setDevice(&tmpFile2);
+ tmpStream << "#include \"../../src/corelib/global/qconfig.h\"" << endl;
+
+ tmpStream.flush();
+ tmpFile2.flush();
+
+ outName = buildPath + "/include/QtCore/qconfig.h";
+ ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
+ QFile::remove(outName);
+
+ tmpFile2.copy(outName);
+ tmpFile2.close();
+ }
+ QTemporaryFile tmpFile2a;
+ if (tmpFile2a.open()) {
+ tmpStream.setDevice(&tmpFile2a);
+ tmpStream << "#include \"qconfig.h\"" << endl;
+
+ tmpStream.flush();
+ tmpFile2a.flush();
+
+ outName = buildPath + "/include/QtCore/QtConfig";
+ ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
+ QFile::remove(outName);
+
+ tmpFile2a.copy(outName);
+ tmpFile2a.close();
+ }
+
QTemporaryFile tmpFile3;
if (tmpFile3.open()) {
tmpStream.setDevice(&tmpFile3);
@@ -3779,7 +3804,10 @@ void Configure::buildQmake()
QTextStream stream(&out);
stream << "#AutoGenerated by configure.exe" << endl
<< "BUILD_PATH = " << QDir::toNativeSeparators(buildPath) << endl
- << "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl;
+ << "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl
+ << "INC_PATH = " << QDir::toNativeSeparators(
+ (QFile::exists(sourcePath + "/.git") ? buildPath : sourcePath)
+ + "/include") << endl;
stream << "QT_VERSION = " << dictionary["VERSION"] << endl;
if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl
@@ -3920,7 +3948,8 @@ void Configure::generateMakefiles()
{
QString dirName;
bool generate = true;
- bool doDsp = (dictionary["VCPROJFILES"] == "yes");
+ bool doDsp = (dictionary["VCPROJFILES"] == "yes"
+ && dictionary["PROCESS"] == "full");
while (generate) {
QString pwd = QDir::currentPath();
QString dirPath = buildPath + dirName;