From b9de3553ad6f26e96c5432df8b1b6be02fa5f9ca Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 18 Oct 2010 10:44:29 +0200 Subject: qmake/symbian: Make sure the destination directory exists before copying cp on unix doesn't create the destination directory if it doesn't exist, as xcopy on windows does. This also requires QMAKE_MKDIR to use mkdir -p to be able to create directories recursively. Merge-request: 861 Reviewed-by: Oswald Buddenhagen --- mkspecs/common/symbian/symbian.conf | 2 +- qmake/generators/symbian/symmake_abld.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index d8c38f4..decec14 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -104,7 +104,7 @@ contains(QMAKE_HOST.os,Windows) { QMAKE_COPY_DIR = cp -r QMAKE_MOVE = mv QMAKE_DEL_FILE = rm -f - QMAKE_MKDIR = mkdir + QMAKE_MKDIR = mkdir -p QMAKE_DEL_DIR = rmdir QMAKE_DEL_TREE = rm -rf QMAKE_CHK_DIR_EXISTS = test -d diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 4f645af..f895109 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -450,6 +450,11 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl; #else + QString dirExists = var("QMAKE_CHK_DIR_EXISTS"); + QString mkdir = var("QMAKE_MKDIR"); + QString dir = QFileInfo(depList.at(i).to).dir().path(); + t << "\t-@ " << dirExists << " \"" << dir << "\" || " + << mkdir << " \"" << dir << "\"" << endl; t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \"" << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl; #endif -- cgit v0.12