Ticket #196: gnumake.diff
File gnumake.diff, 3.6 KB (added by , 13 years ago) |
---|
-
gnumake.cpp
213 213 QStringList seen; 214 214 215 215 for (QStringList::Iterator it = libs.begin(); it != libs.end(); /*below*/) { 216 216 QString &lib = *it; 217 217 218 if (lib.startsWith("\"") && lib.endsWith("\"")) 219 lib = lib.mid(1, lib.length()-2); 220 218 221 if (lib.startsWith("-L")) { 219 222 // this is a library path 220 dirs.append(QMakeLocalFileName( (*it).mid(2)));223 dirs.append(QMakeLocalFileName(lib.mid(2))); 221 224 ++it; 222 225 continue; 223 226 } … … 423 426 if (!project->first("PRECOMPILED_HEADER").isEmpty() 424 427 && project->isActiveConfig("precompile_header")) { 425 428 QString preCompHeader = var("PRECOMPILED_DIR") 426 429 + QFileInfo(project->first("PRECOMPILED_HEADER")).fileName(); 427 430 preCompHeaderOut = preCompHeader + ".gch"; 428 431 project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c"); 429 432 project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c++"); 430 433 431 434 project->values("QMAKE_RUN_CC").clear(); 432 435 project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader + 433 436 " $(CFLAGS) $(INCPATH) -o $obj $src"); 434 437 project->values("QMAKE_RUN_CC_IMP").clear(); 435 438 project->values("QMAKE_RUN_CC_IMP").append("$(CC) -c -include " + preCompHeader + … … 489 492 foreach(const QString &libVar, libVars) { 490 493 QStringList libs = project->values(libVar); 491 494 for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) { 492 QString lib = escapeFilePath(*it); 495 QString &lib = *it; 496 497 if (lib.startsWith("\"") && lib.endsWith("\"")) 498 lib = lib.mid(1, lib.length()-2); 499 493 500 /* lib may be prefixed with -l which is commonly used in e.g. PRF 494 501 * (feature) files on all platforms; remove it before prepending 495 502 * the compiler-specific option. There is even more weird case … … 497 504 * this as well and replace it with the proper option. */ 498 505 if (lib.startsWith("-L")) { 499 506 lib = lib.mid(2); 500 t << " " << optL << lib;507 t << " " << escapeFilePath(optL + lib); 501 508 } else { 502 509 if (lib.startsWith("-l")) 503 510 lib = lib.mid(2); 504 t << " " << opt << lib;511 t << " " << escapeFilePath(opt + lib); 505 512 } 506 513 } 507 514 } … … 638 645 fprintf(stderr, "Please specify one of them, not both."); 639 646 exit(1); 640 647 } 641 648 project->values("RES_FILE").prepend(escapeFilePath(QString("$(OBJECTS_DIR)") + 642 649 QDir::separator() + 643 650 QFileInfo(var("RC_FILE")).baseName() + 644 651 ".res")); 645 652 project->values("CLEAN_FILES") += "$(RES_FILE)"; 646 653 } 647 654 648 655 if (!project->isEmpty("RES_FILE"))