summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-02-24 16:22:53 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-04-12 15:50:51 +0000
commit2ad7f6ddf5042d7442c97a89b083ca2853cf5721 (patch)
tree55eb85622019b54f09d01d96d608744c4c512efb /qmake/generators/makefile.cpp
parent7f29367c09d069958e0e9fb539ee88df04877b7e (diff)
Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to preserve the last modification timestamps of files. On Windows the use of copy does not preserve them. As a cross-platform solution, this patch introduces a simple built-in install command in qmake to copy files. Task-number: QTBUG-59004 Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 2845888dde..5f3b8c9047 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1294,7 +1294,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
else if (is_target || fi.isExecutable())
cmd = "-$(INSTALL_PROGRAM)";
else
- cmd = "-$(INSTALL_FILE)";
+ cmd = "-$(QINSTALL_FILE)";
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
@@ -1320,7 +1320,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
} else if (installConfigValues.contains("executable")) {
cmd = QLatin1String("-$(INSTALL_PROGRAM)");
} else {
- cmd = QLatin1String("-$(INSTALL_FILE)");
+ cmd = QLatin1String("-$(QINSTALL_FILE)");
}
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
@@ -1336,7 +1336,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
dst_file += Option::dir_sep;
dst_file += fi.fileName();
}
- QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " " +
+ QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(QINSTALL_FILE)") + " " +
escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file);
inst << cmd;
if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
@@ -2248,6 +2248,7 @@ MakefileGenerator::writeDefaultVariables(QTextStream &t)
t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl;
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 << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;