From ebd04a5aa891521d577eeed152347310753af214 Mon Sep 17 00:00:00 2001 From: Christoph Keller Date: Tue, 3 Jul 2018 17:17:48 +0200 Subject: qmake: Fix xcode problems with invalid build paths Qmake accidentally replaced all occurrences of the library name in the build path. This would lead to problems if the (shadow) build path also contains the library name. Task-number: QTBUG-69279 Change-Id: If99acccc779ff0874433b193be7e7fc53625b245 Reviewed-by: Oswald Buddenhagen --- qmake/generators/mac/pbuilder_pbx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 80891e682f..3206174d93 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -874,7 +874,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) name.chop(librarySuffix.length()); } } else { - library.replace(name, name + suffixSetting); + int pos = library.lastIndexOf(name); + if (pos != -1) + library.insert(pos + name.length(), suffixSetting); } } } -- cgit v1.2.3 From da4dcc0893fce3555b35d931801f94f472593742 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jul 2018 15:10:57 +0200 Subject: qmake: make sure 'move' commands to DESTDIR are valid on mingw the code ensures that the path ends with a path separator, which is unhealthy under mingw when the command ends with that path, because it's interpreted as a line continuation. the easiest fix is just duplicating the name of the moved file to the destination side. the cleaner fix would have been cleaning up the path separator mess, but that's a more invasive change and doesn't seem worth it. Task-number: QTBUG-69255 Change-Id: I338f8997b84ed7049b5665872dd25f90b9d4d16a Reviewed-by: Joerg Bornemann --- qmake/generators/unix/unixmake2.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 3cb3be474a..ecb0de3b52 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -599,7 +599,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << var("QMAKE_LINK_SHLIB_CMD"); if(!destdir.isEmpty()) t << "\n\t" - << "-$(MOVE) $(TARGET) " << destdir << " "; + << "-$(MOVE) $(TARGET) " << destdir << "$(TARGET)"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; @@ -636,16 +636,16 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!destdir.isEmpty()) { t << "\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" - << "-$(MOVE) $(TARGET) " << destdir << " "; + << "-$(MOVE) $(TARGET) " << destdir << "$(TARGET)"; if (!project->isActiveConfig("unversioned_libname")) { t << "\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t" - << "-$(MOVE) $(TARGET0) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET1) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET2) " << destdir << " "; + << "-$(MOVE) $(TARGET0) " << destdir << "$(TARGET0)\n\t" + << "-$(MOVE) $(TARGET1) " << destdir << "$(TARGET1)\n\t" + << "-$(MOVE) $(TARGET2) " << destdir << "$(TARGET2)"; } } if(!project->isEmpty("QMAKE_POST_LINK")) @@ -660,8 +660,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t" - << "-$(MOVE) $(TARGET) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET0) " << destdir << " \n\t"; + << "-$(MOVE) $(TARGET) " << destdir << "$(TARGET)\n\t" + << "-$(MOVE) $(TARGET0) " << destdir << "$(TARGET0)\n\t"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; -- cgit v1.2.3 From 70d9fecd0acc624a2413bd2fe362adb85880773b Mon Sep 17 00:00:00 2001 From: Christoph Keller Date: Mon, 2 Jul 2018 18:41:26 +0200 Subject: Fix recursive qmake xcode project generation with shadow builds For some reason, the solution generator was looking for the xcodeproj files in the source tree. It should look for them in the output tree instead. Task-number: QTBUG-69244 Change-Id: I7525886d614ddfdee705b27aacafc8f90a6f9d1d Reviewed-by: Oswald Buddenhagen --- qmake/generators/mac/pbuilder_pbx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 3206174d93..a0aea70dc5 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -149,13 +149,13 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) if(!qmake_setpwd(dir)) fprintf(stderr, "Cannot find directory: %s\n", dir.toLatin1().constData()); } - Option::output_dir = Option::globals->shadowedPath(QDir::cleanPath(fi.absoluteFilePath())); + Option::output_dir = Option::globals->shadowedPath(qmake_getpwd()); if(tmp_proj.read(fn)) { if(tmp_proj.first("TEMPLATE") == "subdirs") { QMakeProject *pp = new QMakeProject(&tmp_proj); pb_subdirs += new ProjectBuilderSubDirs(pp, dir); } else if(tmp_proj.first("TEMPLATE") == "app" || tmp_proj.first("TEMPLATE") == "lib") { - QString pbxproj = qmake_getpwd() + Option::dir_sep + tmp_proj.first("TARGET") + projectSuffix(); + QString pbxproj = Option::output_dir + Option::dir_sep + tmp_proj.first("TARGET") + projectSuffix(); if(!exists(pbxproj)) { warn_msg(WarnLogic, "Ignored (not found) '%s'", pbxproj.toLatin1().constData()); goto nextfile; // # Dirty! -- cgit v1.2.3