From b54efea2e97baac1d9442e829be2d6fb322c5085 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 17 Dec 2010 11:37:52 +0200 Subject: Use relative include instead of absolute in default qmake.conf Absolute include path breaks QtP releases which copy mkspecs under epoc32 and do not necessarily have the sources available in the original absolute path and can't patch the paths either at installation time. Task-number: QTBUG-16172 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c967dad..915a56d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3267,8 +3267,14 @@ void Configure::generateConfigfiles() if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream qmakeConfStream; qmakeConfStream.setDevice(&qmakeConfFile); + // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the + // primary use of this variable by qmake to identify the original mkspec, the + // variable is also used for few special cases where the absolute path is required. + // Conversely, the include of the original qmake.conf must be done using relative path, + // as some Qt binary deployments are done in a manner that doesn't allow for patching + // the paths at the installation time. qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl; - qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl; + qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl; qmakeConfStream.flush(); qmakeConfFile.close(); } -- cgit v0.12