Changeset 974


Ignore:
Timestamp:
Aug 12, 2011, 4:43:31 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: gnumake/os2: Make QMAKESPECDIR always point to original mkspec.

This allows to avoid duplicating all the contents of mkspecs/os2-g++ in
mkspecs/default but only keep a dummy qmake.conf that refers to the original
one.

File:
1 edited

Legend:

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

    r973 r974  
    301301         "$(subst +,\\+,$(subst $(space),\\ ,$(subst \",,$(1)))))))" << endl << endl;
    302302
    303     t << "QMAKESPECDIR  = " << escapeFilePath(specdir()) << endl;
    304 
    305     // MakefileGenerator::writeSubTargets() already puts the MAKEFILE definitoin
    306     // but others don't; add it here since we use it within generated makefiles
    307     if (project->first("TEMPLATE") != "subdirs") {
     303    QString spec = specdir();
     304    if (QFileInfo(spec).fileName() == "default") {
     305        // use the real specdir; this allows to only have a dumb qmake.conf in
     306        // the default mkspec dir and keep the rest in the real one (to avoid
     307        // unnecessary duplication, in the absense of symlinks on OS/2)
     308        QString origSpec = var("QMAKESPEC_ORIGINAL");
     309        if (!origSpec.isEmpty())
     310            spec = QDir::cleanPath(QDir(spec).absoluteFilePath(origSpec));
     311    }
     312    t << "QMAKESPECDIR  = " << escapeFilePath(spec) << endl;
     313
     314    // MakefileGenerator::writeSubTargets() already puts the MAKEFILE definition
     315    // for subdirs-like makefiles but we also use it in normal ones
     316    if (project->first("TEMPLATE") != "subdirs" &&
     317        (project->isActiveConfig("build_pass") || project->values("BUILDS").isEmpty())) {
    308318        QString ofile = escapeFilePath(Option::output.fileName());
    309319        if(ofile.lastIndexOf(Option::dir_sep) != -1)
Note: See TracChangeset for help on using the changeset viewer.