diff options
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 39 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 17 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.h | 1 |
5 files changed, 44 insertions, 19 deletions
@@ -634,12 +634,14 @@ fi # initalize variables #------------------------------------------------------------------------------- -SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS" +SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" for varname in $SYSTEM_VARIABLES; do qmakevarname="${varname}" # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS if [ "${varname}" = "LDFLAGS" ]; then qmakevarname="LFLAGS" + elif [ "${varname}" = "LD" ]; then + qmakevarname="LINK" fi cmd=`echo \ 'if [ -n "\$'${varname}'" ]; then diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 0678d86..b72a8dfd 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -85,6 +85,45 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return false; } +QString NmakeMakefileGenerator::getPdbTarget() +{ + return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb"); +} + +QString NmakeMakefileGenerator::defaultInstall(const QString &t) +{ + if((t != "target" && t != "dlltarget") || + (t == "dlltarget" && (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("shared"))) || + project->first("TEMPLATE") == "subdirs") + return QString(); + + QString ret = Win32MakefileGenerator::defaultInstall(t); + + const QString root = "$(INSTALL_ROOT)"; + QStringList &uninst = project->values(t + ".uninstall"); + QString targetdir = Option::fixPathToTargetOS(project->first(t + ".path"), false); + targetdir = fileFixify(targetdir, FileFixifyAbsolute); + if(targetdir.right(1) != Option::dir_sep) + targetdir += Option::dir_sep; + + if(t == "target" && project->first("TEMPLATE") == "lib") { + if(project->isActiveConfig("shared") && project->isActiveConfig("debug")) { + QString pdb_target = getPdbTarget(); + pdb_target.remove('"'); + QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target; + QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute)); + if(!ret.isEmpty()) + ret += "\n\t"; + ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\""; + if(!uninst.isEmpty()) + uninst.append("\n\t"); + uninst.append("-$(DEL_FILE) \"" + dst_targ + "\""); + } + } + + return ret; +} + QStringList &NmakeMakefileGenerator::findDependencies(const QString &file) { QStringList &aList = MakefileGenerator::findDependencies(file); diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h index a751e45..b3fcb82 100644 --- a/qmake/generators/win32/msvc_nmake.h +++ b/qmake/generators/win32/msvc_nmake.h @@ -57,6 +57,8 @@ class NmakeMakefileGenerator : public Win32MakefileGenerator void init(); protected: + virtual QString getPdbTarget(); + virtual QString defaultInstall(const QString &t); virtual QStringList &findDependencies(const QString &file); QString var(const QString &value); QString precompH, precompObj, precompPch; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index ddfe399..5f56d66 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -775,11 +775,6 @@ QString Win32MakefileGenerator::getLibTarget() return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".lib"); } -QString Win32MakefileGenerator::getPdbTarget() -{ - return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb"); -} - QString Win32MakefileGenerator::defaultInstall(const QString &t) { if((t != "target" && t != "dlltarget") || @@ -820,18 +815,6 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) \"" + dst_targ + "\""); } - if(project->isActiveConfig("shared") && project->isActiveConfig("debug")) { - QString pdb_target = getPdbTarget(); - pdb_target.remove('"'); - QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target; - QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute)); - if(!ret.isEmpty()) - ret += "\n\t"; - ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\""; - if(!uninst.isEmpty()) - uninst.append("\n\t"); - uninst.append("-$(DEL_FILE) \"" + dst_targ + "\""); - } } if(t == "dlltarget" || project->values(t + ".CONFIG").indexOf("no_dll") == -1) { diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index 3a2e3a1..5437524 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -83,7 +83,6 @@ protected: virtual void processRcFileVar(); virtual void processFileTagsVar(); virtual QString getLibTarget(); - virtual QString getPdbTarget(); }; inline Win32MakefileGenerator::~Win32MakefileGenerator() |