diff options
author | axis <qt-info@nokia.com> | 2010-03-11 09:15:55 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-03-11 09:42:47 (GMT) |
commit | a375537d32bc33ba1154ec132f99f5a779bce067 (patch) | |
tree | 3c23e3b2c44fb52d7d62036fe7dd793e589841e8 /qmake/generators | |
parent | 02f6da62a42bd1059eb0da091d1f46efbb919750 (diff) | |
parent | 1e9552f826c05bf9884fb2893dedca265ead363b (diff) | |
download | Qt-a375537d32bc33ba1154ec132f99f5a779bce067.zip Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.gz Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts:
mkspecs/common/symbian/symbian.conf
qmake/generators/makefile.h
qmake/project.cpp
src/3rdparty/webkit/WebCore/WebCore.pro
src/src.pro
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 26 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 3 | ||||
-rw-r--r-- | qmake/generators/metamakefile.cpp | 48 | ||||
-rw-r--r-- | qmake/generators/metamakefile.h | 5 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 13 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_abld.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.h | 1 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/borland_bmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 24 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.h | 1 |
17 files changed, 112 insertions, 40 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index ac9fa99..1a7391b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -523,9 +523,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); QTextStream mkt(&mkf); writeHeader(mkt); - mkt << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? - QString((QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake")) : - var("QMAKE_QMAKE")) << endl; + mkt << "QMAKE = " << var("QMAKE_QMAKE") << endl; writeMakeQmake(mkt); mkt.flush(); mkf.close(); diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index ec712a0..b9d2445 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -806,9 +806,8 @@ MakefileGenerator::init() } // escape qmake command - if (!project->isEmpty("QMAKE_QMAKE")) { - project->values("QMAKE_QMAKE") = escapeFilePaths(project->values("QMAKE_QMAKE")); - } + QStringList &qmk = project->values("QMAKE_QMAKE"); + qmk = escapeFilePaths(qmk); } bool @@ -2097,7 +2096,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) bool MakefileGenerator::writeStubMakefile(QTextStream &t) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -2152,12 +2151,14 @@ QString MakefileGenerator::buildArgs(const QString &outdir) ret += " -nodependheuristics"; if(!Option::mkfile::qmakespec_commandline.isEmpty()) ret += " -spec " + specdir(outdir); - if(Option::target_mode == Option::TARG_MACX_MODE) - ret += " -macx"; - else if(Option::target_mode == Option::TARG_UNIX_MODE) - ret += " -unix"; - else if(Option::target_mode == Option::TARG_WIN_MODE) - ret += " -win32"; + if (Option::target_mode_overridden) { + if (Option::target_mode == Option::TARG_MACX_MODE) + ret += " -macx"; + else if (Option::target_mode == Option::TARG_UNIX_MODE) + ret += " -unix"; + else if (Option::target_mode == Option::TARG_WIN_MODE) + ret += " -win32"; + } //configs for(QStringList::Iterator it = Option::user_configs.begin(); @@ -2210,8 +2211,7 @@ MakefileGenerator::writeHeader(QTextStream &t) t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) - t << "# Command: " << build_args().replace("$(QMAKE)", - (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE"))) << endl; + t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl; t << "#############################################################################" << endl; t << endl; } @@ -2344,7 +2344,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << "MAKEFILE = " << ofile << endl; /* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires * back-slashes to be turned into slashes. */ - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; t << "MKDIR = " << var("QMAKE_MKDIR") << endl; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 85510ea..4c3be3d 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -247,7 +247,8 @@ public: virtual bool supportsMergedBuilds() { return false; } virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; } virtual bool openOutput(QFile &, const QString &build) const; - virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; } + virtual bool isWindowsShell() const { return Option::host_mode == Option::HOST_WIN_MODE; } + virtual bool isForSymbianSbsv2() const { return false; } // FIXME: killme - i'm ugly! /* The next one is to avoid having SymbianCommonGenerator as a virtually inherited class of this class. Instead it is without a base class diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index dc3bbc7..e76e596 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -293,7 +293,15 @@ SubdirsMetaMakefileGenerator::init() init_flag = true; bool hasError = false; - if(Option::recursive) { + // It might make sense to bequeath the CONFIG option to the recursed + // projects. OTOH, one would most likely have it in all projects anyway - + // either through a qmakespec, a .qmake.cache or explicitly - as otherwise + // running qmake in a subdirectory would have a different auto-recurse + // setting than in parent directories. + bool recurse = Option::recursive == Option::QMAKE_RECURSIVE_YES + || (Option::recursive == Option::QMAKE_RECURSIVE_DEFAULT + && project->isRecursive()); + if(recurse) { QString old_output_dir = Option::output_dir; QString old_output = Option::output.fileName(); QString oldpwd = qmake_getpwd(); @@ -375,7 +383,7 @@ SubdirsMetaMakefileGenerator::init() Subdir *self = new Subdir; self->input_dir = qmake_getpwd(); self->output_dir = Option::output_dir; - if(!Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir())) + if(!recurse || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir())) self->output_file = Option::output.fileName(); self->makefile = new BuildsMetaMakefileGenerator(project, name, false); self->makefile->init(); @@ -459,7 +467,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) } else if(gen == "PROJECTBUILDER" || gen == "XCODE") { mkfile = new ProjectBuilderMakefileGenerator; } else if(gen == "MSVC.NET") { - if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1) + if (proj->first("TEMPLATE").startsWith("vc")) mkfile = new VcprojGenerator; else mkfile = new NmakeMakefileGenerator; @@ -481,6 +489,40 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) return mkfile; } +bool +MetaMakefileGenerator::modesForGenerator(const QString &gen, + Option::HOST_MODE *host_mode, Option::TARG_MODE *target_mode) +{ + if (gen == "UNIX") { +#ifdef Q_OS_MAC + *host_mode = Option::HOST_MACX_MODE; + *target_mode = Option::TARG_MACX_MODE; +#else + *host_mode = Option::HOST_UNIX_MODE; + *target_mode = Option::TARG_UNIX_MODE; +#endif + } else if (gen == "MSVC.NET" || gen == "MINGW" || gen == "BMAKE") { + *host_mode = Option::HOST_WIN_MODE; + *target_mode = Option::TARG_WIN_MODE; + } else if (gen == "PROJECTBUILDER" || gen == "XCODE") { + *host_mode = Option::HOST_MACX_MODE; + *target_mode = Option::TARG_MACX_MODE; + } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX") { +#if defined(Q_OS_MAC) + *host_mode = Option::HOST_MACX_MODE; +#elif defined(Q_OS_UNIX) + *host_mode = Option::HOST_UNIX_MODE; +#else + *host_mode = Option::HOST_WIN_MODE; +#endif + *target_mode = Option::TARG_SYMBIAN_MODE; + } else { + fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); + return false; + } + return true; +} + MetaMakefileGenerator * MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op, bool *success) { diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h index 8675115..e559c8e 100644 --- a/qmake/generators/metamakefile.h +++ b/qmake/generators/metamakefile.h @@ -42,6 +42,8 @@ #ifndef METAMAKEFILE_H #define METAMAKEFILE_H +#include <option.h> + #include <qlist.h> #include <qstring.h> @@ -65,6 +67,9 @@ public: static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success = 0); static MakefileGenerator *createMakefileGenerator(QMakeProject *proj, bool noIO = false); + static bool modesForGenerator(const QString &generator, + Option::HOST_MODE *host_mode, Option::TARG_MODE *target_mode); + inline QMakeProject *projectFile() const { return project; } virtual bool init() = 0; diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 8622cd9..d225635 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -111,7 +111,7 @@ ProjectGenerator::init() add_depend = true; if(dir.right(1) != Option::dir_sep) dir += Option::dir_sep; - if(Option::recursive) { + if(Option::recursive == Option::QMAKE_RECURSIVE_YES) { QStringList files = QDir(dir).entryList(QDir::Files); for(int i = 0; i < (int)files.count(); i++) { if(files[i] != "." && files[i] != "..") @@ -138,7 +138,7 @@ ProjectGenerator::init() dir = regex.left(s+1); regex = regex.right(regex.length() - (s+1)); } - if(Option::recursive) { + if(Option::recursive == Option::QMAKE_RECURSIVE_YES) { QStringList entries = QDir(dir).entryList(QDir::Dirs); for(int i = 0; i < (int)entries.count(); i++) { if(entries[i] != "." && entries[i] != "..") { @@ -193,7 +193,7 @@ ProjectGenerator::init() subdirs.append(nd); } } - if(Option::recursive) { + if(Option::recursive == Option::QMAKE_RECURSIVE_YES) { QStringList dirs = QDir(newdir).entryList(QDir::Dirs); for(int i = 0; i < (int)dirs.count(); i++) { QString nd = fileFixify(newdir + QDir::separator() + dirs[i]); @@ -230,7 +230,8 @@ ProjectGenerator::init() } } } - if(Option::recursive && !knownDirs.contains(newdir, Qt::CaseInsensitive)) + if(Option::recursive == Option::QMAKE_RECURSIVE_YES + && !knownDirs.contains(newdir, Qt::CaseInsensitive)) knownDirs.append(newdir); } } diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index a812e5f..393e56b 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1001,6 +1001,10 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy fixedItem = item; } + QString condition; + if (!project->isEmpty(item + ".condition")) + condition = project->first(item + ".condition"); + QFileInfo subdir(fileInfo(fixedItem)); QString relativePath = directory.relativeFilePath(fixedItem); QString subdirFileName = subdir.completeBaseName(); @@ -1029,9 +1033,16 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy bldinfDefine = bldinfDefine.toUpper(); removeEpocSpecialCharacters(bldinfDefine); + if (!condition.isEmpty()) + t << "#if defined(" << condition << ")" << endl; + t << "#ifndef " << bldinfDefine << endl; t << "\t#include \"" << bldinfFilename << "\"" << endl; - t << "#endif // " << bldinfDefine << endl; + t << "#endif" << endl; + + if (!condition.isEmpty()) + t << "#endif" << endl; + } // Add supported project platforms diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 1fc87aa..f05e7ff 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -200,7 +200,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << endl; t << "MAKEFILE = " << wrapperFile.fileName() << endl; - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 8c7eabf..d1d0104 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -144,7 +144,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "# ==============================================================================" << "\n" << endl; t << endl; t << "MAKEFILE = " << wrapperFile.fileName() << endl; - t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h index b8ccdbe..286c91c 100644 --- a/qmake/generators/symbian/symmake_sbsv2.h +++ b/qmake/generators/symbian/symmake_sbsv2.h @@ -56,6 +56,7 @@ protected: virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly); virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile); virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath); + virtual bool isForSymbianSbsv2() const { return true; } // FIXME: killme - i'm ugly! public: diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 030983d..db5b957 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -103,8 +103,6 @@ UnixMakefileGenerator::init() MakefileGenerator::init(); if(project->isEmpty("MAKEFILE")) project->values("MAKEFILE").append("Makefile"); - if(project->isEmpty("QMAKE_QMAKE")) - project->values("QMAKE_QMAKE").append("qmake"); if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); return; /* subdirs is done */ diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index b9e0ec8..3e731a1 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -81,7 +81,7 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t) writeHeader(t); if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -154,7 +154,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "AR = " << var("QMAKE_AR") << endl; t << "RANLIB = " << var("QMAKE_RANLIB") << endl; - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "TAR = " << var("QMAKE_TAR") << endl; t << "COMPRESS = " << var("QMAKE_GZIP") << endl; if(project->isActiveConfig("compile_libtool")) diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp index 9208e1d..b5c33c4 100644 --- a/qmake/generators/win32/borland_bmake.cpp +++ b/qmake/generators/win32/borland_bmake.cpp @@ -115,8 +115,6 @@ BorlandMakefileGenerator::init() project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)"); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); return; } diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index e1f502f..fd43145 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -143,7 +143,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") { if(Option::mkfile::do_stub_makefile) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -248,8 +248,6 @@ void MingwMakefileGenerator::init() project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)"); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); return; } diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 7566b23..92e8aeb 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -156,8 +156,6 @@ void NmakeMakefileGenerator::init() MakefileGenerator::init(); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); if(project->isEmpty("QMAKE_COPY_FILE")) project->values("QMAKE_COPY_FILE").append("$(COPY)"); if(project->isEmpty("QMAKE_COPY_DIR")) diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 9d3b4c6..64aaf34 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -150,6 +150,10 @@ Win32MakefileGenerator::findLibraries(const QString &where) if(QMakeMetaInfo::libExists((*it).local() + Option::dir_sep + lib) || exists((*it).local() + Option::dir_sep + lib + extension)) { out = (*it).real() + Option::dir_sep + lib + extension; + if (out.contains(QLatin1Char(' '))) { + out.prepend(QLatin1Char('\"')); + out.append(QLatin1Char('\"')); + } break; } } @@ -591,8 +595,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) writeIncPart(t); writeLibsPart(t); - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : - Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") : Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl; t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") : @@ -764,6 +767,11 @@ 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") || @@ -804,6 +812,18 @@ 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 5437524..3a2e3a1 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -83,6 +83,7 @@ protected: virtual void processRcFileVar(); virtual void processFileTagsVar(); virtual QString getLibTarget(); + virtual QString getPdbTarget(); }; inline Win32MakefileGenerator::~Win32MakefileGenerator() |