summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-17 15:59:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-17 15:59:49 (GMT)
commit803c7c3ff783ca74bc75fe574a98db51e2de9f22 (patch)
tree4d637736ab7adb9df04057cdc930479092d745b3 /qmake
parent509ef11ab4ba6165c16d9d311c4a1bf7cdfd2528 (diff)
parent8aff2b3e6f09b446f124b7023485e947ab1bf24b (diff)
downloadQt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.zip
Qt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.tar.gz
Qt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Doc: fix typo QCompleter: fix misuse of QMap that can lead to crashes qmake: added possibility to specify the type of an install target
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d949b63..5ec47ec 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1277,13 +1277,26 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
}
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
QStringList files = QDir(local_dirstr).entryList(QStringList(filestr));
- if(project->values((*it) + ".CONFIG").indexOf("no_check_exist") != -1 && files.isEmpty()) {
+ const QStringList &installConfigValues = project->values((*it) + ".CONFIG");
+ if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
if(!target.isEmpty())
target += "\t";
QString dst_file = filePrefixRoot(root, dst);
QFileInfo fi(fileInfo(wild));
- QString cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)") + " " +
- wild + " " + dst_file + "\n";
+ QString cmd;
+ if (installConfigValues.contains("directory")) {
+ cmd = QLatin1String("-$(INSTALL_DIR)");
+ if (!dst_file.endsWith(Option::dir_sep))
+ dst_file += Option::dir_sep;
+ dst_file += fi.fileName();
+ } else if (installConfigValues.contains("executable")) {
+ cmd = QLatin1String("-$(INSTALL_PROGRAM)");
+ } else if (installConfigValues.contains("data")) {
+ cmd = QLatin1String("-$(INSTALL_FILE)");
+ } else {
+ cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)");
+ }
+ cmd += " " + wild + " " + dst_file + "\n";
target += cmd;
if(!uninst.isEmpty())
uninst.append("\n\t");