de-duplicate top-level bundle symlink creation
multiple QMAKE_BUNDLE_DATA entries can install into the same directory, but it obviously makes no sense to symlink that repeatedly. Change-Id: If65f7acdf4e158e33511917a027a380e642e2f28 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
8c138054b3
commit
6c6b5ff8fb
@ -703,6 +703,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!project->isEmpty("QMAKE_BUNDLE")) {
|
if (!project->isEmpty("QMAKE_BUNDLE")) {
|
||||||
|
QHash<QString, QString> symlinks;
|
||||||
ProStringList &alldeps = project->values("ALL_DEPS");
|
ProStringList &alldeps = project->values("ALL_DEPS");
|
||||||
QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
|
QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
|
||||||
if (!project->first("QMAKE_PKGINFO").isEmpty()) {
|
if (!project->first("QMAKE_PKGINFO").isEmpty()) {
|
||||||
@ -810,13 +811,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
if (!project->isEmpty(vkey)) {
|
if (!project->isEmpty(vkey)) {
|
||||||
QString version = project->first(vkey) + "/" +
|
QString version = project->first(vkey) + "/" +
|
||||||
project->first("QMAKE_FRAMEWORK_VERSION") + "/";
|
project->first("QMAKE_FRAMEWORK_VERSION") + "/";
|
||||||
QString link = Option::fixPathToLocalOS(path + project->first(pkey));
|
symlinks[Option::fixPathToLocalOS(path + project->first(pkey))] =
|
||||||
bundledFiles << link;
|
project->first(vkey) + "/Current/" + project->first(pkey);
|
||||||
alldeps << link;
|
|
||||||
t << link << ": \n\t"
|
|
||||||
<< mkdir_p_asstring(path) << "\n\t"
|
|
||||||
<< "@$(SYMLINK) " << project->first(vkey) + "/Current/" << project->first(pkey)
|
|
||||||
<< " " << path << endl;
|
|
||||||
path += version;
|
path += version;
|
||||||
}
|
}
|
||||||
path += project->first(pkey).toQString();
|
path += project->first(pkey).toQString();
|
||||||
@ -842,6 +838,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
QHash<QString, QString>::ConstIterator symIt = symlinks.constBegin(),
|
||||||
|
symEnd = symlinks.constEnd();
|
||||||
|
for (; symIt != symEnd; ++symIt) {
|
||||||
|
bundledFiles << symIt.key();
|
||||||
|
alldeps << symIt.key();
|
||||||
|
t << symIt.key() << ":\n\t"
|
||||||
|
<< mkdir_p_asstring(bundle_dir) << "\n\t"
|
||||||
|
<< "@$(SYMLINK) " << symIt.value() << " " << bundle_dir << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t << endl << "all: " << escapeDependencyPath(deps)
|
t << endl << "all: " << escapeDependencyPath(deps)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user