summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/generators/makefile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index b9d2445..29a2422 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1245,7 +1245,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
}
if(!dirstr.endsWith(Option::dir_sep))
dirstr += Option::dir_sep;
- if(exists(wild)) { //real file
+ bool is_target = (wild == fileFixify(var("TARGET"), FileFixifyAbsolute));
+ if(is_target || exists(wild)) { //real file or target
QString file = wild;
QFileInfo fi(fileInfo(wild));
if(!target.isEmpty())
@@ -1259,7 +1260,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
QString cmd;
if (fi.isDir())
cmd = "-$(INSTALL_DIR)";
- else if (fi.isExecutable())
+ else if (is_target || fi.isExecutable())
cmd = "-$(INSTALL_PROGRAM)";
else
cmd = "-$(INSTALL_FILE)";