diff options
author | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-03-16 11:29:20 (GMT) |
---|---|---|
committer | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-03-16 11:29:20 (GMT) |
commit | 39dcac49c9a20eaa9b347276d97547461c3904aa (patch) | |
tree | 8a0cc8574bed910f24438ee0fe5fb961021b3a65 /qmake/generators/unix/unixmake2.cpp | |
parent | 82198dd1f7049cec89271b0ea82521752cc13c05 (diff) | |
parent | e318b0276c3d4a0db8660b4fa6d68f1784aee522 (diff) | |
download | Qt-39dcac49c9a20eaa9b347276d97547461c3904aa.zip Qt-39dcac49c9a20eaa9b347276d97547461c3904aa.tar.gz Qt-39dcac49c9a20eaa9b347276d97547461c3904aa.tar.bz2 |
Merge remote branch 'qt-master/master'
Conflicts:
src/corelib/thread/qthread_unix.cpp
Diffstat (limited to 'qmake/generators/unix/unixmake2.cpp')
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 5ea13f4..212f8bd 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -712,11 +712,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << info_plist_out << ": " << "\n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; + QStringList commonSedArgs; + if (!project->values("VERSION").isEmpty()) + commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "; + commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? + QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; if(project->first("TEMPLATE") == "app") { QString icon = fileFixify(var("ICON")); t << "@$(DEL_FILE) " << info_plist_out << "\n\t" - << "@sed " - << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " + << "@sed "; + foreach (const QString &arg, commonSedArgs) + t << arg; + t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" " << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " @@ -732,9 +739,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } else { t << "@$(DEL_FILE) " << info_plist_out << "\n\t" - << "@sed " - << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" " - << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" " + << "@sed "; + foreach (const QString &arg, commonSedArgs) + t << arg; + t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" " << "-e \"s,@TYPEINFO@," << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " |