summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-25 16:46:15 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-10-01 10:56:29 +0200
commit4849037851b210507df63eb4aed7e467c834be62 (patch)
tree3983e0adb9d2f652abb4d7d33ef0a222b9739771
parente9c1e3076c748149eed5296f999688db7a26488b (diff)
nest bundle-related conditionals for clarity
Change-Id: I97f9d87cb5a114bf4764f13f0fd0d22e9b4da96f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--qmake/generators/unix/unixmake2.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 55a94bef90..77170c3e89 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -702,26 +702,27 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl;
}
- if(!project->first("QMAKE_PKGINFO").isEmpty()) {
- ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
- QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents";
- t << pkginfo << ": \n\t";
- if(!destdir.isEmpty())
+ if (!project->isEmpty("QMAKE_BUNDLE")) {
+ if (!project->first("QMAKE_PKGINFO").isEmpty()) {
+ ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
+ QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents";
+ t << pkginfo << ": \n\t";
+ if (!destdir.isEmpty())
+ t << mkdir_p_asstring(destdir) << "\n\t";
+ t << "@$(DEL_FILE) " << pkginfo << "\n\t"
+ << "@echo \"APPL"
+ << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
+ ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
+ << "\" >" << pkginfo << endl;
+ }
+ if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) {
+ ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE"));
+ bundledFiles << resources;
+ QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources";
+ t << resources << ": \n\t";
t << mkdir_p_asstring(destdir) << "\n\t";
- t << "@$(DEL_FILE) " << pkginfo << "\n\t"
- << "@echo \"APPL"
- << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
- << "\" >" << pkginfo << endl;
- }
- if(!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) {
- ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE"));
- bundledFiles << resources;
- QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources";
- t << resources << ": \n\t";
- t << mkdir_p_asstring(destdir) << "\n\t";
- t << "@touch " << resources << "\n\t\n";
- }
- if(!project->isEmpty("QMAKE_BUNDLE")) {
+ t << "@touch " << resources << "\n\t\n";
+ }
//copy the plist
QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())),
info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString());