summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-05-23 10:58:30 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-05-23 11:06:48 +0200
commit20e9422e069a27b7e29b54207447e6ca02b3a55a (patch)
tree8009b21eaa9415bef0a63aa82a7549ad8b7c7292 /qmake/generators
parentec6dc5f78453048c4f0604655a34c6c20c79d819 (diff)
Do not ignore exit codes of install commands
All calls to QINSTALL or QINSTALL_PROGRAM were written into Makefiles with a preceding dash which lets make ignore the command's exit code. Scripts (and users) calling 'make install' had no way to determine if an installation completely succeeded, unless they inspected make's output or the installation tree. Remove the leading dash from those commands to stop 'make install' on failure. Users who really want to ignore the exit codes can run 'make -k install'. [ChangeLog][qmake] Installation targets do not ignore the exit code of QINSTALL and QINSTALL_PROGRAM anymore. Fixes: QTBUG-18870 Change-Id: I7c072c896e6bd2b2ddba4b9c082c5bf627c90f50 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp10
-rw-r--r--qmake/generators/unix/unixmake.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index bf8eb3f5da..95452e507c 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1294,9 +1294,9 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
dst_file += fi.fileName();
QString cmd;
if (is_target || (!fi.isDir() && fi.isExecutable()))
- cmd = QLatin1String("-$(QINSTALL_PROGRAM)");
+ cmd = QLatin1String("$(QINSTALL_PROGRAM)");
else
- cmd = QLatin1String("-$(QINSTALL)");
+ cmd = QLatin1String("$(QINSTALL)");
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
@@ -1316,9 +1316,9 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
dst_file += filestr;
QString cmd;
if (installConfigValues.contains("executable"))
- cmd = QLatin1String("-$(QINSTALL_PROGRAM)");
+ cmd = QLatin1String("$(QINSTALL_PROGRAM)");
else
- cmd = QLatin1String("-$(QINSTALL)");
+ cmd = QLatin1String("$(QINSTALL)");
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false))));
@@ -1331,7 +1331,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
if (!dst_file.endsWith(Option::dir_sep))
dst_file += Option::dir_sep;
dst_file += fi.fileName();
- QString cmd = QLatin1String("-$(QINSTALL) ") +
+ QString cmd = QLatin1String("$(QINSTALL) ") +
escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file);
inst << cmd;
if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 836737e77d..dbcf2a9a77 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -604,7 +604,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1)));
if(!ret.isEmpty())
ret += "\n\t";
- ret += "-$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst;
+ ret += "$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst;
if(!uninst.isEmpty())
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + dst);
@@ -640,16 +640,16 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
QString copy_cmd;
if (bundle == SolidBundle) {
- copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + plain_targ;
+ copy_cmd += "$(QINSTALL) " + src_targ + ' ' + plain_targ;
} else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
- copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + dst_targ;
+ copy_cmd += "$(QINSTALL) " + src_targ + ' ' + dst_targ;
} else if (!isAux) {
if (bundle == SlicedBundle) {
if (!ret.isEmpty())
ret += "\n\t";
ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false);
}
- copy_cmd += "-$(QINSTALL_PROGRAM) " + src_targ + ' ' + dst_targ;
+ copy_cmd += "$(QINSTALL_PROGRAM) " + src_targ + ' ' + dst_targ;
}
if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib")
&& project->values(ProKey(t + ".CONFIG")).indexOf("fix_rpath") != -1) {
@@ -702,7 +702,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
ret += "\n\t";
ret += mkdir_p_asstring("\"`dirname " + dst + "`\"", false) + "\n\t";
ret += "-$(DEL_FILE) " + dst + "\n\t"; // Can't overwrite symlinks to directories
- ret += "-$(QINSTALL) " + escapeFilePath(src) + " " + dst;
+ ret += "$(QINSTALL) " + escapeFilePath(src) + " " + dst;
if (!uninst.isEmpty())
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + dst);