Changeset 29 for trunk/qmake/generators


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/generators
Files:
7 edited

Legend:

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

    r27 r29  
    100100        ret += dir;
    101101    ret += " ";
    102     if(isWindowsShell())
     102    if(isDosLikeShell())
    103103        ret += "$(MKDIR)";
    104104    else
     
    125125    }
    126126    bool ret = true;
    127 #ifdef Q_OS_WIN
     127#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
    128128    bool driveExists = true;
    129129    if(!QDir::isRelativePath(path)) {
     
    11911191{
    11921192    QString rm_dir_contents("-$(DEL_FILE)");
    1193     if (!isWindowsShell()) //ick
     1193    if (!isDosLikeShell()) //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 (!isDosLikeShell() && 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#include "gnumake.h"
    423424#include "projectgenerator.h"
    424425#include "pbuilder_pbx.h"
     
    447448    } else if(gen == "MINGW") {
    448449        mkfile = new MingwMakefileGenerator;
     450    } else if(gen == "GNUMAKE") {
     451        mkfile = new GNUMakefileGenerator;
    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::isDosLikeShell() const
     63{
     64#ifdef Q_OS_OS2
    6565    return Option::shellPath.isEmpty();
    6666#else
    67     return Win32MakefileGenerator::isWindowsShell();
     67    return Win32MakefileGenerator::isDosLikeShell();
    6868#endif
    6969}
     
    162162 }
    163163
     164/* @todo remove
    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/* @todo remove
    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/* @todo remove
    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 isDosLikeShell() 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::isDosLikeShell() const
    6161{
    6262#ifdef Q_OS_WIN
    6363    return Option::shellPath.isEmpty();
    6464#else
    65     return Win32MakefileGenerator::isWindowsShell();
     65    return Win32MakefileGenerator::isDosLikeShell();
    6666#endif
    6767}
  • trunk/qmake/generators/win32/mingw_make.h

    r2 r29  
    5656    QString getLibTarget();
    5757private:
    58     bool isWindowsShell() const;
     58    bool isDosLikeShell() const;
    5959    void writeMingwParts(QTextStream &);
    6060    void writeIncPart(QTextStream &t);
Note: See TracChangeset for help on using the changeset viewer.