Changeset 29


Ignore:
Timestamp:
Jun 12, 2009, 1:32:11 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: More OS/2-specific fixes. Enabled GNUMakefileGenerator (turned on by MAKEFILE_GENERATOR=GNUMAKE).

Location:
trunk/qmake
Files:
10 edited

Legend:

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

    r27 r29  
    100100        ret += dir;
    101101    ret += " ";
    102     if(isWindowsShell())
     102    if(isShell())
    103103        ret += "$(MKDIR)";
    104104    else
     
    125125    }
    126126    bool ret = true;
    127 #ifdef Q_OS_WIN
     127#if
    128128    bool driveExists = true;
    129129    if(!QDir::isRelativePath(path)) {
     
    11911191{
    11921192    QString rm_dir_contents("-$(DEL_FILE)");
    1193     if (!isWindowsShell()) //ick
     1193    if (!isShell()) //ick
    11941194        rm_dir_contents = "-$(DEL_FILE) -r";
    11951195
     
    13421342            for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) {
    13431343                QString tmp_dst = fileFixify((*pit), FileFixifyAbsolute, false);
    1344                 if (!isWindowsShell() && tmp_dst.right(1) != Option::dir_sep)
     1344                if (!isShell() && tmp_dst.right(1) != Option::dir_sep)
    13451345                    tmp_dst += Option::dir_sep;
    13461346                t << mkdir_p_asstring(filePrefixRoot(root, tmp_dst)) << "\n\t";
  • trunk/qmake/generators/makefile.h

    r2 r29  
    245245    virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; }
    246246    virtual bool openOutput(QFile &, const QString &build) const;
    247     virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
     247    virtual bool isDosLikeShell() const { return Option::target_mode == Option::TARG_WIN_MODE ||
     248                                                 Option::target_mode == Option::TARG_OS2_MODE; }
    248249};
    249250
  • trunk/qmake/generators/metamakefile.cpp

    r2 r29  
    421421#include "unixmake.h"
    422422#include "mingw_make.h"
     423
    423424#include "projectgenerator.h"
    424425#include "pbuilder_pbx.h"
     
    447448    } else if(gen == "MINGW") {
    448449        mkfile = new MingwMakefileGenerator;
     450
     451
    449452    } else if(gen == "PROJECTBUILDER" || gen == "XCODE") {
    450453        mkfile = new ProjectBuilderMakefileGenerator;
  • trunk/qmake/generators/os2/gnumake.cpp

    r21 r29  
    6060}
    6161
    62 bool GNUMakefileGenerator::isWindowsShell() const
    63 {
    64 #ifdef Q_OS_WIN
     62bool GNUMakefileGenerator::isShell() const
     63{
     64#ifdef Q_OS_
    6565    return Option::shellPath.isEmpty();
    6666#else
    67     return Win32MakefileGenerator::isWindowsShell();
     67    return Win32MakefileGenerator::isShell();
    6868#endif
    6969}
     
    162162 }
    163163
     164
    164165void createLdObjectScriptFile(const QString &fileName, const QStringList &objList)
    165166{
     
    199200    }
    200201}
     202
    201203
    202204void GNUMakefileGenerator::writeGNUParts(QTextStream &t)
     
    368370            ar_script_file += "." + var("BUILD_NAME");
    369371        }
     372
    370373        createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
     374
    371375        objectsLinkLine = "ar -M < " + ar_script_file;
    372376    } else {
     
    375379            ld_script_file += "." + var("BUILD_NAME");
    376380        }
     381
    377382        createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
     383
    378384        objectsLinkLine = ld_script_file;
    379385    }
  • trunk/qmake/generators/os2/gnumake.h

    r21 r29  
    5858    QString getLibTarget();
    5959private:
    60     bool isWindowsShell() const;
     60    bool isShell() const;
    6161    void writeGNUParts(QTextStream &);
    6262    void writeIncPart(QTextStream &t);
  • trunk/qmake/generators/win32/mingw_make.cpp

    r2 r29  
    5858}
    5959
    60 bool MingwMakefileGenerator::isWindowsShell() const
     60bool MingwMakefileGenerator::isShell() const
    6161{
    6262#ifdef Q_OS_WIN
    6363    return Option::shellPath.isEmpty();
    6464#else
    65     return Win32MakefileGenerator::isWindowsShell();
     65    return Win32MakefileGenerator::isShell();
    6666#endif
    6767}
  • trunk/qmake/generators/win32/mingw_make.h

    r2 r29  
    5656    QString getLibTarget();
    5757private:
    58     bool isWindowsShell() const;
     58    bool isShell() const;
    5959    void writeMingwParts(QTextStream &);
    6060    void writeIncPart(QTextStream &t);
  • trunk/qmake/main.cpp

    r2 r29  
    9797    QString reporterPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator()
    9898                           + "qtusagereporter";
    99 #if defined(Q_OS_WIN)
     99#if defined(Q_OS_WIN)
    100100    reporterPath += ".exe";
    101101#endif
     
    105105
    106106    QString oldpwd = qmake_getpwd();
    107 #ifdef Q_WS_WIN
     107#if
    108108    if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/")))
    109109#endif
  • trunk/qmake/option.cpp

    r27 r29  
    343343}
    344344
    345 #ifdef Q_OS_WIN
     345#if
    346346static QStringList detectShellPath()
    347347{
     
    356356    }
    357357    return paths;
     358
     359
     360
     361
     362
     363
     364
     365
    358366}
    359367#endif
     
    375383    Option::h_ext << ".h" << ".hpp" << ".hh" << ".hxx";
    376384    Option::c_ext << ".c";
    377 #ifndef Q_OS_WIN
     385#if
    378386    Option::h_ext << ".H";
    379387#endif
     
    381389    Option::h_moc_ext = ".cpp";
    382390    Option::cpp_ext << ".cpp" << ".cc" << ".cxx";
    383 #ifndef Q_OS_WIN
     391#if
    384392    Option::cpp_ext << ".C";
    385393#endif
     
    387395    Option::yacc_ext = ".y";
    388396    Option::pro_ext = ".pro";
    389 #ifdef Q_OS_WIN
     397#if
    390398    Option::dirlist_sep = ";";
    391399    Option::shellPath = detectShellPath();
     
    404412            Option::qmake_abslocation = argv0;
    405413        } else if (argv0.contains(QLatin1Char('/'))
    406 #ifdef Q_OS_WIN
     414#if
    407415                   || argv0.contains(QLatin1Char('\\'))
    408416#endif
     
    412420            QByteArray pEnv = qgetenv("PATH");
    413421            QDir currentDir = QDir::current();
    414 #ifdef Q_OS_WIN
     422#if
    415423            QStringList paths = QString::fromLocal8Bit(pEnv).split(QLatin1String(";"));
    416424#else
     
    421429                    continue;
    422430                QString candidate = currentDir.absoluteFilePath(*p + QLatin1Char('/') + argv0);
    423 #ifdef Q_OS_WIN
     431#if
    424432                candidate += ".exe";
    425433#endif
     
    625633    Q_ASSERT(!((flags & Option::FixPathToLocalSeparators) && (flags & Option::FixPathToTargetSeparators)));
    626634    if(flags & Option::FixPathToLocalSeparators) {
    627 #if defined(Q_OS_WIN32)
     635#if defined(Q_OS_WIN2)
    628636        string = string.replace('/', '\\');
    629637#else
     
    719727#endif
    720728
     729
     730
     731
     732
     733
     734
    721735QString qmake_libraryInfoFile()
    722736{
    723737    QString ret;
    724 #if defined( Q_OS_WIN )
     738#if defined()
    725739    QFileInfo filePath;
    726740    QT_WA({
     
    733747        filePath = QString::fromLocal8Bit(module_name);
    734748    });
     749
     750
     751
     752
     753
     754
     755
     756
     757
     758
    735759    ret = filePath.filePath();
    736760#else
  • trunk/qmake/project.cpp

    r28 r29  
    5959#elif defined(Q_OS_WIN32)
    6060#include <Windows.h>
     61
     62
    6163#endif
    6264#include <stdio.h>
     
    31763178            }
    31773179        }
     3180
     3181
     3182
     3183
     3184
     3185
     3186
     3187
     3188
     3189
     3190
     3191
     3192
     3193
     3194
     3195
     3196
     3197
     3198
     3199
     3200
     3201
     3202
     3203
     3204
     3205
     3206
     3207
     3208
     3209
     3210
    31783211#elif defined(Q_OS_UNIX)
    31793212        struct utsname name;
Note: See TracChangeset for help on using the changeset viewer.