From 56c92b1e5add9bf07be64b2dd74d878679afde73 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 (cherry picked from commit da4dcc0893fce3555b35d931801f94f472593742) --- qmake/generators/unix/unixmake2.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 6b08a2dd28..6d67d07e4d 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