Ticket #220: gnumake.diff
File gnumake.diff, 3.9 KB (added by , 13 years ago) |
---|
-
gnumake.cpp
423 423 if (!project->first("PRECOMPILED_HEADER").isEmpty() 424 424 && project->isActiveConfig("precompile_header")) { 425 425 QString preCompHeader = var("PRECOMPILED_DIR") 426 426 + QFileInfo(project->first("PRECOMPILED_HEADER")).fileName(); 427 427 preCompHeaderOut = preCompHeader + ".gch"; 428 428 project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c"); 429 429 project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c++"); 430 430 431 431 project->values("QMAKE_RUN_CC").clear(); 432 432 project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader + 433 433 " $(CFLAGS) $(INCPATH) -o $obj $src"); 434 434 project->values("QMAKE_RUN_CC_IMP").clear(); 435 435 project->values("QMAKE_RUN_CC_IMP").append("$(CC) -c -include " + preCompHeader + … … 563 563 void GNUMakefileGenerator::writeRcAndDefVariables(QTextStream &t) 564 564 { 565 565 if (!project->isEmpty("RC_FILE")) { 566 t << "RC_FILE = " << escapeFilePath(var("RC_FILE")) << endl; 566 QString rcFile = fileFixify(var("RC_FILE"), Option::output_dir, 567 qmake_getpwd(), FileFixifyRelative); 568 t << "RC_FILE = " << escapeFilePath(rcFile) << endl; 567 569 } 568 570 if (!project->isEmpty("RES_FILE")) { 569 571 t << "RES_FILE = " << valList(escapeFilePaths(project->values("RES_FILE"))) << endl; … … 638 640 fprintf(stderr, "Please specify one of them, not both."); 639 641 exit(1); 640 642 } 641 643 project->values("RES_FILE").prepend(escapeFilePath(QString("$(OBJECTS_DIR)") + 642 644 QDir::separator() + 643 645 QFileInfo(var("RC_FILE")).baseName() + 644 646 ".res")); 645 647 project->values("CLEAN_FILES") += "$(RES_FILE)"; 646 648 } 647 649 648 650 if (!project->isEmpty("RES_FILE")) … … 712 714 fileName += "." + var("BUILD_NAME"); 713 715 } 714 716 fileName += ".rsp"; 717 715 718 QString filePath = project->first("OBJECTS_DIR"); 716 719 if (filePath.isEmpty()) 717 filePath = Option::output_dir; 718 filePath = Option::fixPathToTargetOS(filePath + QDir::separator() + fileName); 719 return filePath; 720 fileName = fileFixify(fileName, Option::output_dir, 721 qmake_getpwd(), FileFixifyRelative); 722 else 723 fileName = Option::fixPathToTargetOS(filePath + '/' + fileName); 724 725 return fileName; 720 726 } 721 727 722 728 void GNUMakefileGenerator::createCompilerResponseFiles(QTextStream &t) … … 736 742 if (!rspVar.isEmpty()) { 737 743 QString fileName = makeResponseFileName(vars[i]); 738 744 t << rspVar.leftJustified(14) << "= " << fileName << endl; 739 QFile file( fileName);745 QFile file(Option::output_dir + fileName); 740 746 if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { 741 747 QTextStream rt(&file); 742 748 if (!qstrcmp(vars[i], "CFLAGS")) { … … 767 773 if (!var.isEmpty()) { 768 774 QString fileName = makeResponseFileName("OBJECTS"); 769 775 t << var.leftJustified(14) << "= " << fileName << endl; 770 QFile file( fileName);776 QFile file(Option::output_dir + fileName); 771 777 if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { 772 778 QTextStream rt(&file); 773 779 rt << varGlue("OBJECTS", QString::null, "\n", "\n");