summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian/symmake_abld.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-01-05 16:07:30 +0100
committeraxis <qt-info@nokia.com>2010-01-05 16:07:30 +0100
commit0d92fc13baac9d354a7d3a2665ca3bb4127bd606 (patch)
tree04308596166ab753de6de705fcd80b091e4562ad /qmake/generators/symbian/symmake_abld.cpp
parent6abee18b8ab9899b909a15227fba8fbc4506fad8 (diff)
parent78474a65e4f61e9d1ae8116d5b690cf78729aa71 (diff)
Merge branch 'merge-request-1601' into master-s60
Conflicts: bin/createpackage.pl mkspecs/features/symbian/application_icon.prf qmake/generators/symbian/symmake_abld.cpp src/gui/text/qfontdatabase_s60.cpp src/s60main/s60main.pro
Diffstat (limited to 'qmake/generators/symbian/symmake_abld.cpp')
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp48
1 files changed, 36 insertions, 12 deletions
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 065af48523..fabd4cf515 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 ":"
@@ -441,21 +455,31 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
{
+#ifdef Q_OS_WIN
+#define HASH "#"
+#define EMPTYECHO "."
+#else
+#define HASH "\\#"
+#define EMPTYECHO
+#endif
+
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 " HASH " ============================================================================== > " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " make sis target. >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " Version : >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo " HASH " ============================================================================== >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo" EMPTYECHO " >> " MAKE_CACHE_NAME << endl;
t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl;
t << endl;
generatedFiles << MAKE_CACHE_NAME;
+#undef HASH
+#undef EMPTYECHO
}
void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension)