Changeset 1073 for trunk/qmake


Ignore:
Timestamp:
Sep 10, 2011, 12:57:26 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: qmake: Let INSTALL_ROOT override the dirve letter too.

This allows to redirect make install to another drive.

Location:
trunk/qmake/generators
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/generators/makefile.h

    r973 r1073  
    216216    QString valList(const QStringList &varList);
    217217
    218     QString filePrefixRoot(const QString &, const QString &);
     218    virtual QString filePrefixRoot(const QString &, const QString &);
    219219
    220220    //file fixification to unify all file names into a single pattern
  • trunk/qmake/generators/os2/gnumake.cpp

    r1043 r1073  
    719719}
    720720
     721QString GNUMakefileGenerator::filePrefixRoot(const QString &root, const QString &path)
     722{
     723    QString ret;
     724    if(path.length() > 2 && path[1] == ':') { //c:\foo
     725        if (root == "$(INSTALL_ROOT)")
     726            ret = QString("$(if %1,%1,%2)").arg(root, path.left(2)) + path.mid(2);
     727        else
     728            ret = QString(path.left(2) + root + path.mid(2));
     729    } else {
     730        ret = root + path;
     731    }
     732    while(ret.endsWith("\\"))
     733        ret = ret.left(ret.length()-1);
     734    return ret;
     735}
     736
    721737QStringList &GNUMakefileGenerator::findDependencies(const QString &file)
    722738{
  • trunk/qmake/generators/os2/gnumake.h

    r979 r1073  
    7676    QString getPdbTarget();
    7777
     78    QString filePrefixRoot(const QString &root, const QString &path);
    7879    QStringList &findDependencies(const QString &file);
    7980
Note: See TracChangeset for help on using the changeset viewer.