diff options
author | Zeno Albisser <zeno.albisser@nokia.com> | 2010-03-10 15:35:59 (GMT) |
---|---|---|
committer | Zeno Albisser <zeno.albisser@nokia.com> | 2010-03-17 16:16:07 (GMT) |
commit | 3d6f1ebf1dbdefc443aa4f8e7d18755383794156 (patch) | |
tree | c8d44f16df2701e7c2480f33f943ba670c4bd5a7 /qmake | |
parent | ed1a76e95a54bb86ce12c5e804550bfbfd58fa7e (diff) | |
download | Qt-3d6f1ebf1dbdefc443aa4f8e7d18755383794156.zip Qt-3d6f1ebf1dbdefc443aa4f8e7d18755383794156.tar.gz Qt-3d6f1ebf1dbdefc443aa4f8e7d18755383794156.tar.bz2 |
qmake: fix to create proper install target in Makefile at first run
Previously when qmake was executed the first time, or when no
previously compiled binary target was available for some reason,
qmake just created an empty install target in the Makefile.
So in fact for a target to be installed properly you needed to run
something like "qmake && make && qmake && make install".
This should now be fixed with this patch.
Reviewed-by: Marius Storm-Olsen
Task-number:QTBUG-5558
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefile.cpp | 5 |
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)"; |