Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git i/qmake/generators/mac/pbuilder_pbx.cpp w/qmake/generators/mac/pbuilder_pbx.cpp
- index 80891e682f..614925ff6d 100644
- --- i/qmake/generators/mac/pbuilder_pbx.cpp
- +++ w/qmake/generators/mac/pbuilder_pbx.cpp
- @@ -1879,8 +1879,9 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
- QFileInfo fi(fileInfo(file.fileName()));
- if(fi.suffix() != "pbxproj" || file.fileName().isEmpty()) {
- QString output = file.fileName();
- - if(fi.isDir())
- - output += QDir::separator();
- + if (output.endsWith(QDir::separator()))
- + output.chop(1);
- + qDebug() << "outut" << output;
- if(!output.endsWith(projectSuffix())) {
- if(file.fileName().isEmpty() || fi.isDir()) {
- if(project->first("TEMPLATE") == "subdirs" || project->isEmpty("QMAKE_ORIG_TARGET"))
- @@ -1889,19 +1890,22 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
- output += project->first("QMAKE_ORIG_TARGET").toQString();
- }
- output += projectSuffix() + QDir::separator();
- - } else if(output[(int)output.length() - 1] != QDir::separator()) {
- + } else {
- output += QDir::separator();
- }
- output += QString("project.pbxproj");
- file.setFileName(output);
- - bool ret = UnixMakefileGenerator::openOutput(file, build);
- - ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1);
- - Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
- - return ret;
- + qDebug() << "messed with output" << output;
- }
- - ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir;
- - return UnixMakefileGenerator::openOutput(file, build);
- + bool ret = UnixMakefileGenerator::openOutput(file, build);
- + ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1);
- + Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
- +
- + qDebug() << "ProjectBuilderMakefileGenerator::openOutput resolved (and fixed) output_dir ="
- + << Option::output_dir << ", pbx_dir =" << ((ProjectBuilderMakefileGenerator*)this)->pbx_dir
- + << "output =" << Option::output;
- + return ret;
- }
- int
- diff --git i/qmake/main.cpp w/qmake/main.cpp
- index 85709dc9bf..10ea94c12c 100644
- --- i/qmake/main.cpp
- +++ w/qmake/main.cpp
- @@ -457,6 +457,7 @@ int runQMake(int argc, char **argv)
- Option::output_dir = oldpwd; //for now this is the output dir
- if(Option::output.fileName() != "-") {
- QFileInfo fi(Option::output);
- + qDebug() << "runQMake messing with output filePath =" << fi.filePath() << fi.isDir() << "path=" << fi.path();
- QString dir;
- if(fi.isDir()) {
- dir = fi.filePath();
- @@ -465,20 +466,31 @@ int runQMake(int argc, char **argv)
- if(!tmp_dir.isEmpty() && QFile::exists(tmp_dir))
- dir = tmp_dir;
- }
- + qDebug() << "\tdir =" << dir;
- #ifdef Q_OS_MAC
- if (fi.fileName().endsWith(QLatin1String(".pbxproj"))
- - && dir.endsWith(QLatin1String(".xcodeproj")))
- - dir += QStringLiteral("/..");
- + || fi.fileName().endsWith(QLatin1String(".xcodeproj"))) {
- + // Logic too complex to resolve here, defer to the (assumed) Xcode generator
- + dir = QString();
- + qDebug() << "nope!";
- + }
- #endif
- - if(!dir.isNull() && dir != ".")
- + if(!dir.isNull() && dir != ".") {
- Option::output_dir = dir;
- + qDebug() << "new output dir is" << dir;
- + }
- if (QDir::isRelativePath(Option::output_dir)) {
- + qDebug() << "adjusting out filename" << Option::output;
- Option::output.setFileName(fi.fileName());
- + qDebug() << "\t output -->" << Option::output;
- Option::output_dir.prepend(oldpwd + QLatin1Char('/'));
- + qDebug() << "\t outut_dir -->" << Option::output_dir;
- }
- Option::output_dir = QDir::cleanPath(Option::output_dir);
- }
- + qDebug() << "runQMake resolved output_dir=" << Option::output_dir << "and output:" << Option::output;
- +
- QMakeProperty prop;
- if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY ||
- Option::qmake_mode == Option::QMAKE_SET_PROPERTY ||
Add Comment
Please, Sign In to add comment