Changeset 8 for trunk/qmake


Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

Location:
trunk/qmake
Files:
4 added
8 edited

Legend:

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

    r7 r8  
    6161QString mkdir_p_asstring(const QString &dir)
    6262{
     63    //@@TODO (dmik): OS/2 cannot create multiple subdirs in mkdir.
     64    //@@TODO (dmik): fix it here? (mkdir a\b\c = mkdir a;a\b;a\b\c)
    6365    QString ret =  "@$(CHK_DIR_EXISTS) \"" + dir + "\" ";
    64     if(Option::target_mode == Option::TARG_WIN_MODE)
     66    if(Option::target_mode == Option::TARG_WIN_MODE ||
     67        Option::target_mode == Option::TARG_OS2_MODE
     68    )
    6569        ret += "$(MKDIR)";
    6670    else
     
    447451            } else {
    448452                if((Option::target_mode == Option::TARG_MAC9_MODE && inc.find(':')) ||
    449                    (Option::target_mode == Option::TARG_WIN_MODE && inc[1] != ':') ||
     453                   ((Option::target_mode == Option::TARG_WIN_MODE ||
     454                     Option::target_mode == Option::TARG_OS2_MODE) && inc[1] != ':') ||
    450455                   ((Option::target_mode == Option::TARG_UNIX_MODE ||
    451456                     Option::target_mode == Option::TARG_QNX6_MODE ||
     
    667672                    path = path.right(path.length() - 1);
    668673                }
    669 #ifdef Q_WS_WIN
     674#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
    670675                bool driveExists = TRUE;
    671676                if ( !QDir::isRelativePath( path ) ) {
     
    694699                        }
    695700                    }
    696 #ifdef Q_WS_WIN
     701#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
    697702                }
    698703#endif
     
    18841889                        uninst.append("\n\t");
    18851890                    uninst.append(
    1886 #ifdef Q_WS_WIN
     1891#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
    18871892                    QString("-$(DEL_FILE)")
    18881893#else
     
    19011906                        uninst.append("\n\t");
    19021907                    uninst.append(
    1903 #ifdef Q_WS_WIN
     1908#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
    19041909                        QString("-$(DEL_FILE)")
    19051910#else
     
    24492454#include "borland_bmake.h"
    24502455#include "mingw_make.h"
     2456#include "gnumake.h"
    24512457#include "msvc_dsp.h"
    24522458#include "msvc_vcproj.h"
     
    24842490    } else if(gen == "MINGW") {
    24852491        mkfile = new MingwMakefileGenerator(proj);
     2492    } else if(gen == "GNUMAKE") {
     2493        mkfile = new GNUMakefileGenerator(proj);
    24862494    } else if(gen == "METROWERKS") {
    24872495        mkfile = new MetrowerksMakefileGenerator(proj);
  • trunk/qmake/generators/unix/unixmake.cpp

    r7 r8  
    857857            for(QStringList::Iterator it = links.begin(); it != links.end(); it++) {
    858858                if(Option::target_mode == Option::TARG_WIN_MODE ||
     859                   Option::target_mode == Option::TARG_OS2_MODE ||
    859860                   Option::target_mode == Option::TARG_MAC9_MODE) {
    860861                } else if(Option::target_mode == Option::TARG_UNIX_MODE ||
  • trunk/qmake/generators/win32/msvc_nmake.cpp

    r7 r8  
    8181{
    8282    QStringList &aList = MakefileGenerator::findDependencies(file);
    83     // Note: The QMAKE_IMAGE_COLLECTION file have all images
    84     // as dependency, so don't add precompiled header then
    85     if (file == project->first("QMAKE_IMAGE_COLLECTION"))
    86         return aList;
    87     for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
    88         if(file.endsWith(*it)) {
    89             if(!aList.contains(precompH))
    90                 aList += precompH;
    91             break;
    92         }
     83    // [dmik] this method can be called from MakefileGenerator::init() before
     84    // precompH is set in NmakeMakefileGenerator::init(), so we check it
     85    // to avoid appending of NULL string to the list of dependencies
     86    if (!precompH.isNull()) {
     87        // Note: The QMAKE_IMAGE_COLLECTION file have all images
     88        // as dependency, so don't add precompiled header then
     89        if (file == project->first("QMAKE_IMAGE_COLLECTION"))
     90            return aList;
     91        for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
     92            if(file.endsWith(*it)) {
     93                if(!aList.contains(precompH))
     94                    aList += precompH;
     95                break;
     96            }
     97        }
    9398    }
    9499    return aList;
  • trunk/qmake/main.cpp

    r7 r8  
    6363    QDir sunworkshop42workaround = QDir::current();
    6464    QString oldpwd = sunworkshop42workaround.currentDirPath();
    65 #ifdef Q_WS_WIN
     65#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
    6666    if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/") ) )
    6767#endif
  • trunk/qmake/option.cpp

    r7 r8  
    7373#if defined(Q_OS_WIN32)
    7474Option::TARG_MODE Option::target_mode = Option::TARG_WIN_MODE;
     75#elif defined(Q_OS_OS2)
     76Option::TARG_MODE Option::target_mode = Option::TARG_OS2_MODE;
    7577#elif defined(Q_OS_MAC9)
    7678Option::TARG_MODE Option::target_mode = Option::TARG_MAC9_MODE;
     
    148150            "\t-unix          Run in unix mode\n"
    149151            "\t-win32         Run in win32 mode\n"
     152            "\t-os2           Run in OS/2 mode\n"
    150153            "\t-macx          Run in Mac OS X mode\n"
    151154            "\t-d             Increase debug level\n"
     
    220223            } else if(opt == "win32") {
    221224                Option::target_mode = TARG_WIN_MODE;
     225            } else if(opt == "os2") {
     226                Option::target_mode = TARG_OS2_MODE;
    222227            } else if(opt == "d") {
    223228                Option::debug_level++;
     
    393398
    394399    //defaults for globals
    395     if(Option::target_mode == Option::TARG_WIN_MODE) {
    396         Option::dir_sep = "\\";
     400    if(Option::target_mode == Option::TARG_WIN_MODE ||
     401        Option::target_mode == Option::TARG_OS2_MODE)
     402    {
     403        Option::dir_sep = "\\";
    397404        Option::obj_ext =  ".obj";
    398405    } else {
     
    485492    if(Option::target_mode == TARG_MAC9_MODE)
    486493        tmp = tmp.replace('/', Option::dir_sep).replace('\\', Option::dir_sep);
    487     else if(Option::target_mode == TARG_WIN_MODE)
     494    else if(Option::target_mode == TARG_WIN_MODE || Option::target_mode == TARG_OS2_MODE)
    488495        tmp = tmp.replace('/', Option::dir_sep);
    489496    else
     
    500507    if(canonical)
    501508        tmp = fixPath(tmp);
    502 #if defined(Q_OS_WIN32)
     509#if defined(Q_OS_WIN32) || defined(Q_OS_OS2)
    503510    return tmp.replace('/', '\\');
    504511#else
  • trunk/qmake/option.h

    r7 r8  
    9696    static int warn_level;
    9797    static QStringList before_user_vars, after_user_vars;
    98     enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE };
     98    enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE, TARG_OS2_MODE };
    9999    static TARG_MODE target_mode;
    100100    static QString user_template, user_template_prefix;
  • trunk/qmake/project.cpp

    r7 r8  
    6969    const QString concat = QDir::separator() + QString("mkspecs");
    7070    if(const char *qmakepath = getenv("QMAKEPATH")) {
    71 #ifdef Q_OS_WIN
     71#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
    7272        QStringList lst = QStringList::split(';', qmakepath);
    7373        for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
     
    707707    else if(Option::target_mode == Option::TARG_WIN_MODE && x == "win32")
    708708        return TRUE;
     709    else if(Option::target_mode == Option::TARG_OS2_MODE && x == "os2")
     710        return TRUE;
    709711
    710712
     
    897899                QStringList feature_roots;
    898900                if(const char *mkspec_path = getenv("QMAKEFEATURES")) {
    899 #ifdef Q_OS_WIN
     901#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
    900902                    QStringList lst = QStringList::split(';', mkspec_path);
    901903                    for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
     
    906908                }
    907909                if(const char *qmakepath = getenv("QMAKEPATH")) {
    908 #ifdef Q_OS_WIN
     910#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
    909911                    QStringList lst = QStringList::split(';', qmakepath);
    910912                    for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
  • trunk/qmake/property.cpp

    r7 r8  
    8989#endif
    9090    } else if(v == "QMAKE_MKSPECS") {
    91         return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
     91        return qmake_mkspec_paths().join(
     92            (Option::target_mode == Option::TARG_WIN_MODE ||
     93            Option::target_mode == Option::TARG_OS2_MODE) ? ";" : ":");
    9294    } else if(v == "QMAKE_VERSION") {
    9395        return qmake_version();
Note: See TracChangeset for help on using the changeset viewer.