summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian/symmake_abld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/symbian/symmake_abld.cpp')
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp42
1 files changed, 30 insertions, 12 deletions
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 4d1673b..b06db2f 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -195,16 +195,21 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
t << "MOVE = " << var("QMAKE_MOVE") << endl;
+#ifdef Q_OS_WIN32
t << "XCOPY = xcopy /d /f /h /r /y /i" << endl;
t << "ABLD = ABLD.BAT" << endl;
+#else
+ t << "XCOPY = cp -u -v" << endl;
+ t << "ABLD = abld" << endl;
+#endif
t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl;
t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl;
t << "MAKE = make" << endl;
t << endl;
t << "ifeq (WINS,$(findstring WINS, $(PLATFORM)))" << endl;
- t << "ZDIR=$(EPOCROOT)epoc32\\release\\$(PLATFORM)\\$(CFG)\\Z" << endl;
+ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/release/$(PLATFORM)/$(CFG)/z") << endl;
t << "else" << endl;
- t << "ZDIR=$(EPOCROOT)epoc32\\data\\z" << endl;
+ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/data/z") << endl;
t << "endif" << endl;
t << endl;
t << "DEFINES" << '\t' << " = "
@@ -304,8 +309,13 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
QString fixedValue(QDir::toNativeSeparators(values.at(i)));
dirsToClean << fixedValue;
+#ifdef Q_OS_WIN32
t << "\t-@ if NOT EXIST \"" << fixedValue << "\" mkdir \""
<< fixedValue << "\"" << endl;
+#else
+ t << "\t-@ if test ! -d \"" << fixedValue << "\"; then mkdir \""
+ << fixedValue << "\"" << "; fi" <<endl;
+#endif
}
}
}
@@ -314,7 +324,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Note: EXTENSION_CLEAN will get called many times when doing reallyclean
// This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
+#ifdef Q_OS_WIN32
generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", "");
+#else
+ generateCleanCommands(t, dirsToClean, "rm", " -rf ", "", "");
+#endif
t << endl;
t << PRE_TARGETDEPS_TARGET ":"
@@ -375,7 +389,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Create execution target
if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
t << "run:" << endl;
+#ifdef Q_OS_WIN32
t << "\t-call " << epocRoot() << "epoc32\\release\\winscw\\udeb\\" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+#else
+ t << "\t-wine " << epocRoot() << "epoc32/release/winscw/udeb/" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+#endif
}
}
@@ -423,16 +441,16 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
{
t << STORE_BUILD_TARGET ":" << endl;
- t << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl;
- t << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # make sis target. >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Version : >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo. >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# ============================================================================== > " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# make sis target. >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# Version : >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo \\# ============================================================================== >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo >> " MAKE_CACHE_NAME << endl;
t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl;
t << endl;