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>
This commit is contained in:
Oswald Buddenhagen 2012-05-18 20:44:01 +02:00
parent 45a201b6a3
commit 5290f6df89
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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"];

View File

@ -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 &);