diff options
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 26 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 23 |
2 files changed, 27 insertions, 22 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index efea807209..c4750cb8a4 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -612,7 +612,7 @@ UnixMakefileGenerator::processPrlFiles() ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS"); if(!prl_libs.isEmpty()) { for(int prl = 0; prl < prl_libs.size(); ++prl) - l.insert(lit+prl+1, prl_libs.at(prl).toQString()); + l.insert(++lit, prl_libs.at(prl)); prl_libs.clear(); } } @@ -699,6 +699,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) return QString(); enum { NoBundle, SolidBundle, SlicedBundle } bundle = NoBundle; + bool isAux = (project->first("TEMPLATE") == "aux"); const QString root = "$(INSTALL_ROOT)"; ProStringList &uninst = project->values(ProKey(t + ".uninstall")); QString ret, destdir = project->first("DESTDIR").toQString(); @@ -773,21 +774,21 @@ UnixMakefileGenerator::defaultInstall(const QString &t) } src_targ = escapeFilePath(src_targ); dst_targ = escapeFilePath(dst_targ); - if(!ret.isEmpty()) - ret += "\n\t"; - QString copy_cmd("-"); + QString copy_cmd; if (bundle == SolidBundle) { - copy_cmd += "$(INSTALL_DIR) " + src_targ + ' ' + plain_targ; + copy_cmd += "-$(INSTALL_DIR) " + src_targ + ' ' + plain_targ; } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { - copy_cmd += "$(INSTALL_FILE) " + src_targ + ' ' + dst_targ; - } else { + copy_cmd += "-$(INSTALL_FILE) " + src_targ + ' ' + dst_targ; + } else if (!isAux) { if (bundle == SlicedBundle) ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false) + "\n\t"; - copy_cmd += "$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ; + copy_cmd += "-$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ; } if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && project->values(ProKey(t + ".CONFIG")).indexOf("fix_rpath") != -1) { + if (!ret.isEmpty()) + ret += "\n\t"; if(!project->isEmpty("QMAKE_FIX_RPATH")) { ret += copy_cmd; ret += "\n\t-" + var("QMAKE_FIX_RPATH") + ' ' + dst_targ + ' ' + dst_targ; @@ -797,11 +798,14 @@ UnixMakefileGenerator::defaultInstall(const QString &t) } else { ret += copy_cmd; } - } else { + } else if (!copy_cmd.isEmpty()) { + if (!ret.isEmpty()) + ret += "\n\t"; ret += copy_cmd; } - if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { + if (isAux) { + } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { if(!project->isEmpty("QMAKE_RANLIB")) ret += QString("\n\t$(RANLIB) ") + dst_targ; } else if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") @@ -820,7 +824,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) uninst.append("\n\t"); if (bundle == SolidBundle) uninst.append("-$(DEL_FILE) -r " + plain_targ); - else + else if (!isAux) uninst.append("-$(DEL_FILE) " + dst_targ); if (bundle == SlicedBundle) { int dstlen = project->first("DESTDIR").length(); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 7c5f4b13ea..5cde7c4ac2 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -922,17 +922,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } } - QString bundle_dir_f = escapeFilePath(bundle_dir); - QHash<QString, QString>::ConstIterator symIt = symlinks.constBegin(), - symEnd = symlinks.constEnd(); - for (; symIt != symEnd; ++symIt) { - bundledFiles << symIt.key(); - alldeps << symIt.key(); - t << escapeDependencyPath(symIt.key()) << ":\n\t" - << mkdir_p_asstring(bundle_dir) << "\n\t" - << "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl; - } - if (!project->first("QMAKE_FRAMEWORK_VERSION").isEmpty()) { + if (!symlinks.isEmpty()) { + QString bundle_dir_f = escapeFilePath(bundle_dir); + QHash<QString, QString>::ConstIterator symIt = symlinks.constBegin(), + symEnd = symlinks.constEnd(); + for (; symIt != symEnd; ++symIt) { + bundledFiles << symIt.key(); + alldeps << symIt.key(); + t << escapeDependencyPath(symIt.key()) << ":\n\t" + << mkdir_p_asstring(bundle_dir) << "\n\t" + << "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl; + } + QString currentLink = bundle_dir + "Versions/Current"; QString currentLink_f = escapeDependencyPath(currentLink); bundledFiles << currentLink; |