Changeset 884 for trunk/qmake/generators/os2/gnumake.cpp
- Timestamp:
- Jul 12, 2011, 12:11:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/os2/gnumake.cpp
r882 r884 724 724 } 725 725 726 static QStringList fixDefines(const QStringList &vals) 727 { 728 // Existing GCC 4.x.x builds for OS/2 can't handle escaping meta symbols 729 // (e.g. quotes) with backslashes in response files (probably an OS/2- 730 // specific bug). The fix this replacing all "\<char>" occurences with 731 // "'<char>'"-like singlequoting which works. 732 // 733 // This backslash escaping is so frequently used in .pro files to pass 734 // string defines to C/C++ (in the form of "DEFINES += VAR=\\\"STRING\\\") 735 // that it makes sense to fix it here rather than introduce an OS/2-specific 736 // alteration of the DEFINES statement in each .pro file. 737 738 QStringList result; 739 foreach(const QString &val, vals) { 740 result << QString(val).replace(QRegExp("\\\\(.)"), "'\\1'"); 741 } 742 return result; 743 } 744 726 745 void GNUMakefileGenerator::createCompilerResponseFiles(QTextStream &t) 727 746 { … … 749 768 rt << varGlue("QMAKE_CXXFLAGS", QString::null, "\n", "\n"); 750 769 } else if (!qstrcmp(vars[i], "DEFINES")) { 751 rt << varGlue("PRL_EXPORT_DEFINES", "-D", "\n-D", "\n") 752 << varGlue("DEFINES", "-D", "\n-D", "\n"); 770 rt << valGlue(fixDefines(project->values("PRL_EXPORT_DEFINES")), 771 "-D", "\n-D", "\n") 772 << valGlue(fixDefines(project->values("DEFINES")), 773 "-D", "\n-D", "\n"); 753 774 } else if (!qstrcmp(vars[i], "INCPATH")) { 754 775 QString opt = var("QMAKE_CFLAGS_INCDIR");
Note:
See TracChangeset
for help on using the changeset viewer.