summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-05-18 20:44:01 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:46:07 +0200
commit5290f6df89027374248e8c117ceb6f9165370f60 (patch)
treec3d8c52a7428ab85da00f6c6de7145b7902b11f4
parent45a201b6a3658c3575f1c44d80a0408ef918afe2 (diff)
introduce $$QMAKE_CHK_EXISTS_GLUE
instead of hard-coding platform differences, use a variable. Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
-rw-r--r--mkspecs/common/shell-unix.conf1
-rw-r--r--mkspecs/common/shell-win32.conf1
-rw-r--r--qmake/generators/makefile.cpp10
-rw-r--r--qmake/generators/makefile.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/mkspecs/common/shell-unix.conf b/mkspecs/common/shell-unix.conf
index a89486723f..967a658cff 100644
--- a/mkspecs/common/shell-unix.conf
+++ b/mkspecs/common/shell-unix.conf
@@ -8,5 +8,6 @@ QMAKE_MOVE = mv -f
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_CHK_EXISTS_GLUE = "|| "
QMAKE_MKDIR = mkdir -p
QMAKE_STREAM_EDITOR = sed
diff --git a/mkspecs/common/shell-win32.conf b/mkspecs/common/shell-win32.conf
index ee137544dc..16f86e5e27 100644
--- a/mkspecs/common/shell-win32.conf
+++ b/mkspecs/common/shell-win32.conf
@@ -6,4 +6,5 @@ QMAKE_MOVE = move
QMAKE_DEL_FILE = del
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = if not exist
+QMAKE_CHK_EXISTS_GLUE =
QMAKE_MKDIR = mkdir
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 7b296151f2..a14e7233f6 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -98,12 +98,7 @@ QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) con
ret += escapeFilePath(dir);
else
ret += dir;
- ret += " ";
- if(isWindowsShell())
- ret += "$(MKDIR)";
- else
- ret += "|| $(MKDIR)";
- ret += " ";
+ ret += " " + chkglue + "$(MKDIR) ";
if(escape)
ret += escapeFilePath(dir);
else
@@ -433,6 +428,9 @@ MakefileGenerator::init()
QHash<QString, QStringList> &v = project->variables();
chkdir = v["QMAKE_CHK_DIR_EXISTS"].join(" ");
+ chkglue = v["QMAKE_CHK_EXISTS_GLUE"].join(" ");
+ if (chkglue.isEmpty()) // Backwards compat with Qt4 specs
+ chkglue = isWindowsShell() ? "" : "|| ";
QStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 44fba2d93b..3a41fb4a9a 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -81,7 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo
QString spec;
bool init_opath_already, init_already, no_io;
QHash<QString, bool> init_compiler_already;
- QString chkdir;
+ QString chkdir, chkglue;
QString build_args(const QString &outdir=QString());
void checkMultipleDefinition(const QString &, const QString &);