Changeset 886


Ignore:
Timestamp:
Jul 13, 2011, 1:59:46 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: os2/gnumake: Removed unnecessary shortening the import library name for the DLL target when TARGET_SHORT is present. Import libraries are often referenced through the LIBS variable in .pro files and this change makes such referencing work w/o the need to change them to shortened ones for the OS/2 platform. Closes #225. Note: this changeset depends on r885.

Location:
trunk/qmake/generators
Files:
4 edited

Legend:

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

    r860 r886  
    974974    if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
    975975        t << "QMAKE_PRL_SOURCE_DIR = " << project->first("QMAKE_ABSOLUTE_SOURCE_PATH") << endl;
     976
     977
    976978    if(!project->isEmpty("TARGET_SHORT"))
    977         t << "QMAKE_PRL_TARGET = " << project->first("TARGET_SHORT") << endl;
    978     else
    979         t << "QMAKE_PRL_TARGET = " << target << endl;
     979        t << "QMAKE_PRL_TARGET_SHORT = " << project->first("TARGET_SHORT") << endl;
     980
    980981    if(!project->isEmpty("PRL_EXPORT_DEFINES"))
    981982        t << "QMAKE_PRL_DEFINES = " << project->values("PRL_EXPORT_DEFINES").join(" ") << endl;
  • trunk/qmake/generators/os2/gnumake.cpp

    r884 r886  
    615615
    616616    if (mode == DLL) {
    617         /* we neeed $(TARGET_IMPLIB) to be in sync with getLibTarget() */
    618         t << "TARGET_IMPLIB = $(basename $(DESTDIR_TARGET)).lib" << endl;
     617        // Note: $(TARGET) may be shortened here due to TARGET_SHORT, use
     618        // the original TARGET value (shortening does not affect implib names)
     619        t << "TARGET_IMPLIB = $(DESTDIR)\\" << var("TARGET") << ".lib" << endl;
    619620    }
    620621}
     
    666667    // GNUMakefileGenerator::findLibraries()
    667668    return;
    668 }
    669 
    670 QString GNUMakefileGenerator::getLibTarget()
    671 {
    672     if (mode == DLL)
    673         return QString("$(notdir $(TARGET_IMPLIB))");
    674     return Win32MakefileGenerator::getLibTarget();
    675669}
    676670
  • trunk/qmake/generators/os2/gnumake.h

    r670 r886  
    7272    void processPrlVariable(const QString &var, const QStringList &l);
    7373    void processPrlFiles();
    74     QString getLibTarget();
    7574
    7675    QStringList &findDependencies(const QString &file);
  • trunk/qmake/generators/win32/winmakefile.cpp

    r885 r886  
    785785QString Win32MakefileGenerator::getLibTarget()
    786786{
    787     QString target = project->first("TARGET_SHORT");
    788     if (target.isEmpty())
    789         target = project->first("TARGET");
    790     return QString(target + project->first("TARGET_VERSION_EXT") + ".lib");
     787    return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".lib");
    791788}
    792789
Note: See TracChangeset for help on using the changeset viewer.