Changeset 912


Ignore:
Timestamp:
Jul 25, 2011, 7:45:36 PM (9 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: A better fix for r905.

This fixes a r905 regression (closes #229) and still solves the original
problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/generators/os2/gnumake.cpp

    r905 r912  
    7171QString GNUMakefileGenerator::escapeFilePath(const QString &path) const
    7272{
    73     QString ret = path;
     73    QString ret = Option::fixPathToTargetOS(path, false);
    7474    if (!isDosLikeShell()) {
    7575        ret.remove('\"');
    76         ret.replace('\\', "/");
     76        ret.replace('\\', '/');
    7777        ret.replace(' ', "\\ ");
    7878    } else {
    79         ret = Option::fixPathToTargetOS(ret, false);
    8079        ret.replace(QRegExp("\""), "");
    8180        ret.replace(QRegExp("[\\\\/]$"), "");
     
    9392    // but instead use the q function defined in writeMakefile() that will do
    9493    // it at runtime.
    95     QString ret = escapeFilePath(path);
     94    QString ret = path;
    9695    QString trimmed = path.trimmed();
    9796    if (!trimmed.startsWith("$(") || !trimmed.endsWith(")")) {
    9897        ret.remove('\"');
    9998        ret.replace(' ', "\\ ");
     99        // but we still want to normalize slashes as this is what we do in
     100        // other places (e.g. .cpp targets); this function will do it for
     101        // QMAKE_EXTRA_TARGETS as well
     102        ret = Option::fixPathToTargetOS(ret, false);
     103        if (!isDosLikeShell())
     104            ret.replace('\\', '/');
    100105    } else {
    101106        ret = escapeFileVars(ret);
Note: See TracChangeset for help on using the changeset viewer.