summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/symmake.cpp42
-rw-r--r--qmake/generators/symbian/symmake.h2
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp32
-rw-r--r--qmake/generators/symbian/symmake_abld.h1
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp6
5 files changed, 79 insertions, 4 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index b4d693c..13feb25 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -72,6 +72,12 @@
#define MMP_TARGETTYPE "TARGETTYPE"
#define MMP_SECUREID "SECUREID"
+#define SISX_TARGET "sisx"
+#define OK_SISX_TARGET "ok_sisx"
+#define FAIL_SISX_NOPKG_TARGET "fail_sisx_nopkg"
+#define FAIL_SISX_NOCACHE_TARGET "fail_sisx_nocache"
+#define RESTORE_BUILD_TARGET "restore_build"
+
#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir)
@@ -1624,6 +1630,41 @@ void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
str.replace(QString(" "), QString("_"));
}
+void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t)
+{
+ t << SISX_TARGET ": " RESTORE_BUILD_TARGET << endl;
+ QString sisxcommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3),$(MAKE) -s %4,$(MAKE) -s %5),$(MAKE) -s %6)")
+ .arg(fileInfo(project->projectFile()).completeBaseName())
+ .arg("pkg")
+ .arg(MAKE_CACHE_NAME)
+ .arg(OK_SISX_TARGET)
+ .arg(FAIL_SISX_NOCACHE_TARGET)
+ .arg(FAIL_SISX_NOPKG_TARGET);
+ t << sisxcommand << endl;
+ t << endl;
+
+ t << OK_SISX_TARGET ":" << endl;
+
+ QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(PLATFORM) $(TARGET) $(CERTIFICATE) $(KEY) $(PASSPHRASE)")
+ .arg(fileInfo(project->projectFile()).completeBaseName())
+ .arg("pkg");
+ t << pkgcommand << endl;
+ t << endl;
+
+ t << FAIL_SISX_NOPKG_TARGET ":" << endl;
+ t << "\t$(error PKG file does not exist, 'SISX' target is only supported for executables or projects with DEPLOYMENT statement)" << endl;
+ t << endl;
+
+ t << FAIL_SISX_NOCACHE_TARGET ":" << endl;
+ t << "\t$(error Project has to be build before calling 'SISX' target)" << endl;
+ t << endl;
+
+
+ t << RESTORE_BUILD_TARGET ":" << endl;
+ t << "-include " MAKE_CACHE_NAME << endl;
+ t << endl;
+}
+
void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
{
t << "dodistclean:" << endl;
@@ -1677,4 +1718,3 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
t << "distclean: clean dodistclean" << endl;
t << endl;
}
-
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 2fea29b..b4b3022 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE
#define MAKEFILE_DEPENDENCY_SEPARATOR " \\\n\t"
#define QT_EXTRA_INCLUDE_DIR "tmp"
+#define MAKE_CACHE_NAME ".make.cache"
class SymbianMakefileGenerator : public MakefileGenerator
{
@@ -136,6 +137,7 @@ protected:
const QString& itemPrefix,
const QString& itemSuffix);
+ void writeSisxTargets(QTextStream &t);
void generateDistcleanTargets(QTextStream& t);
// Subclass implements
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 271d210..d66557a 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -58,6 +58,7 @@
#define ALL_SOURCE_DEPS_TARGET "all_source_deps"
#define WINSCW_DEPLOYMENT_TARGET "winscw_deployment"
#define WINSCW_DEPLOYMENT_CLEAN_TARGET "winscw_deployment_clean"
+#define STORE_BUILD_TARGET "store_build"
SymbianAbldMakefileGenerator::SymbianAbldMakefileGenerator() : SymbianMakefileGenerator() { }
SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { }
@@ -108,7 +109,7 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET);
wrapperTargets << WINSCW_DEPLOYMENT_TARGET << WINSCW_DEPLOYMENT_CLEAN_TARGET;
} else {
- buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET);
+ buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET " " STORE_BUILD_TARGET);
cleanDeps.append(EXTENSION_CLEAN);
cleanDepsWinscw.append(EXTENSION_CLEAN " " WINSCW_DEPLOYMENT_CLEAN_TARGET);
finalDeps.append(FINALIZE_TARGET);
@@ -118,7 +119,8 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
<< EXTENSION_CLEAN
<< FINALIZE_TARGET
<< WINSCW_DEPLOYMENT_CLEAN_TARGET
- << WINSCW_DEPLOYMENT_TARGET;
+ << WINSCW_DEPLOYMENT_TARGET
+ << STORE_BUILD_TARGET;
}
t << "MAKMAKE: " << buildDeps << endl << endl;
@@ -143,7 +145,7 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
QString makefile(Option::fixPathToTargetOS(fileInfo(wrapperFileName).canonicalFilePath()));
foreach(QString target, wrapperTargets) {
t << target << " : " << makefile << endl;
- t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << endl << endl;
+ t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " PLATFORM=$(PLATFORM) TARGET=$(CFG)" << endl << endl;
}
t << endl;
@@ -353,6 +355,10 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
writeDeploymentTargets(t);
+ writeSisxTargets(t);
+
+ writeStoreBuildTarget(t);
+
generateDistcleanTargets(t);
t << "clean: $(ABLD)" << endl;
@@ -408,6 +414,26 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
return true;
}
+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 sisx 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 PLATFORM ?= $(PLATFORM) >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo TARGET ?= $(TARGET) >> " MAKE_CACHE_NAME << endl;
+ t << endl;
+
+ generatedFiles << MAKE_CACHE_NAME;
+}
+
void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension)
{
// Normally emulator deployment gets done via regular makefile, but since subdirs
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index 7709d5d..67da43e 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -56,6 +56,7 @@ protected:
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
+ void writeStoreBuildTarget(QTextStream &t);
bool writeDeploymentTargets(QTextStream &t);
public:
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 2471a2b..8b38f3b 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -219,6 +219,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
qDeleteAll(subtargets);
}
+ writeSisxTargets(t);
+
generateDistcleanTargets(t);
t << "clean: " << BLD_INF_FILENAME << endl;
@@ -402,6 +404,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << "END" << endl;
t << endl;
+ t << "START EXTENSION qt/qmake_store_build" << endl;
+ t << "END" << endl;
+ t << endl;
+
t << endl;
}