From 05bd88bdd86b8204623ef4719cbe244d391edeac Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 10 Jun 2016 20:15:12 -0700 Subject: Fix an issue causing qmake to generate corrupt Makefiles. This resolves an issue where qmake would generate a Makefile with an install command immediately followed by a test command, with no intermediary newline and tab to separate them. Task-number: QTBUG-54035 Change-Id: I7f9226f25e92b49ce689d252e9c4a58b877f2972 Reviewed-by: Oswald Buddenhagen --- qmake/generators/unix/unixmake.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'qmake/generators/unix') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index d2483459d8..122ecb0caa 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -606,8 +606,11 @@ UnixMakefileGenerator::defaultInstall(const QString &t) } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { copy_cmd += "-$(INSTALL_FILE) " + src_targ + ' ' + dst_targ; } else if (!isAux) { - if (bundle == SlicedBundle) - ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false) + "\n\t"; + if (bundle == SlicedBundle) { + if (!ret.isEmpty()) + ret += "\n\t"; + ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false); + } copy_cmd += "-$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ; } if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") -- cgit v1.2.3