summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc.pri4
-rw-r--r--qmake/generators/makefile.cpp19
2 files changed, 18 insertions, 5 deletions
diff --git a/doc/doc.pri b/doc/doc.pri
index 463c447f1a..c6073f0f7e 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -45,11 +45,11 @@ docs.depends = adp_docs qch_docs
# Install rules
htmldocs.files = $$QT_BUILD_TREE/doc/html
htmldocs.path = $$[QT_INSTALL_DOCS]
-htmldocs.CONFIG += no_check_exist
+htmldocs.CONFIG += no_check_exist directory
qchdocs.files= $$QT_BUILD_TREE/doc/qch
qchdocs.path = $$[QT_INSTALL_DOCS]
-qchdocs.CONFIG += no_check_exist
+qchdocs.CONFIG += no_check_exist directory
docimages.files = $$QT_BUILD_TREE/doc/src/images
docimages.path = $$[QT_INSTALL_DOCS]/src
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index db2737bd5f..6b855617e2 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");