diff options
author | Sean Harmer <sh@theharmers.co.uk> | 2010-11-25 10:20:12 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-11-25 10:21:14 (GMT) |
commit | d9e6d9ca595c3ec1f1c2b66b365e51ee34d29bf3 (patch) | |
tree | b17224cf1d5dbb13b91380ea7b8a9830b40d79cd | |
parent | f024ac21c14222982395bd2336a5ea74b96eec64 (diff) | |
download | Qt-d9e6d9ca595c3ec1f1c2b66b365e51ee34d29bf3.zip Qt-d9e6d9ca595c3ec1f1c2b66b365e51ee34d29bf3.tar.gz Qt-d9e6d9ca595c3ec1f1c2b66b365e51ee34d29bf3.tar.bz2 |
qmake/MinGW: do not copy .pdb files on "make install"
Simply refactoring pdb part into the nmake generator at this stage.
Some work is being repeated from the base class implementation. Will get
it working first then see if I can refactor to remove the redundancy.
Task-number: QTBUG-14236
Merge-request: 2506
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
-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 |
4 files changed, 41 insertions, 18 deletions
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() |