summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 4568f1d4f2..9f0655a2b9 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1283,7 +1283,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
if(is_target || exists(wild)) { //real file or target
QFileInfo fi(fileInfo(wild));
QString dst_file = filePrefixRoot(root, dst_dir);
- if(fi.isDir() && project->isActiveConfig("copy_dir_files")) {
+ if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) {
if(!dst_file.endsWith(Option::dir_sep))
dst_file += Option::dir_sep;
dst_file += fi.fileName();
@@ -1317,10 +1317,15 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
dst_file += Option::dir_sep;
dst_file += filestr;
}
- } else if (installConfigValues.contains("executable")) {
- cmd = QLatin1String("-$(QINSTALL_PROGRAM)");
} else {
- cmd = QLatin1String("-$(QINSTALL_FILE)");
+ if (installConfigValues.contains("executable")) {
+ cmd = QLatin1String("-$(QINSTALL_PROGRAM)");
+ } else {
+ cmd = QLatin1String("-$(QINSTALL_FILE)");
+ }
+ if (!dst_file.endsWith(Option::dir_sep))
+ dst_file += Option::dir_sep;
+ dst_file += filestr;
}
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
@@ -1331,7 +1336,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false))));
QFileInfo fi(fileInfo(dirstr + file));
QString dst_file = filePrefixRoot(root, fileFixify(dst_dir, FileFixifyAbsolute, false));
- if(fi.isDir() && project->isActiveConfig("copy_dir_files")) {
+ if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) {
if(!dst_file.endsWith(Option::dir_sep))
dst_file += Option::dir_sep;
dst_file += fi.fileName();