summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-02-27 14:05:06 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-04-13 11:33:21 +0000
commitf074d72c8f9354fcf941fe32a9279d9c68944456 (patch)
tree845914c120ba71c490e205e346e0eedadefb7f43 /qmake/generators
parentfbcdf6d7532d62e4e11deda1b6e6aa8f4b9aebaa (diff)
Preserve last modification timestamps of installed program files
Similar to the parent commit, this patch adds a unified code path in qmake itself for installing program files while preserving their original last modification timestamp. Change-Id: I7b7dcfa6228c2bfd48ea6036549398bb6f90032f Task-number: QTBUG-59004 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp5
-rw-r--r--qmake/generators/unix/unixmake.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.cpp1
3 files changed, 5 insertions, 3 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index b97dc7128a..4568f1d4f2 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1292,7 +1292,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
if (fi.isDir())
cmd = "-$(INSTALL_DIR)";
else if (is_target || fi.isExecutable())
- cmd = "-$(INSTALL_PROGRAM)";
+ cmd = "-$(QINSTALL_PROGRAM)";
else
cmd = "-$(QINSTALL_FILE)";
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
@@ -1318,7 +1318,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
dst_file += filestr;
}
} else if (installConfigValues.contains("executable")) {
- cmd = QLatin1String("-$(INSTALL_PROGRAM)");
+ cmd = QLatin1String("-$(QINSTALL_PROGRAM)");
} else {
cmd = QLatin1String("-$(QINSTALL_FILE)");
}
@@ -2249,6 +2249,7 @@ MakefileGenerator::writeDefaultVariables(QTextStream &t)
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl;
+ t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 0f5e6dc8c0..b485a7ec84 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -629,7 +629,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
ret += "\n\t";
ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false);
}
- copy_cmd += "-$(INSTALL_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) {
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index b6dd734bc2..86d388354a 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -531,6 +531,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl;
+ t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl;
t << endl;
t << "####### Output directory\n\n";