summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-20 02:36:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-20 02:36:04 (GMT)
commit036a2b87672b22a04b4dc35c7a51fadf86bf8f65 (patch)
tree87faabd6b922caaa8eb4c8b84be5e074a4fd8be1
parent8f10ca802dee1ed110f301191c4a56a85575033c (diff)
parent66cf8c714a6194036d9735a7d6c52d4394193a21 (diff)
downloadQt-036a2b87672b22a04b4dc35c7a51fadf86bf8f65.zip
Qt-036a2b87672b22a04b4dc35c7a51fadf86bf8f65.tar.gz
Qt-036a2b87672b22a04b4dc35c7a51fadf86bf8f65.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public: Added exception to destdir location for abld and sbsv2. Moved the "sis" target and friends from cpp code to qmake profiles.
-rw-r--r--mkspecs/features/symbian/qt.prf114
-rw-r--r--qmake/generators/symbian/symmake.cpp97
-rw-r--r--qmake/generators/symbian/symmake.h1
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp33
-rw-r--r--qmake/generators/symbian/symmake_abld.h1
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
6 files changed, 114 insertions, 134 deletions
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index 99f5ece..02b3003 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -39,3 +39,117 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0
isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+
+# Sis file creation
+make_cache_name = .make.cache
+!symbian-abld:!symbian-sbsv2 {
+ fixedDestdir = $$DESTDIR
+ !isEmpty(fixedDestdir):!contains(fixedDestdir, "[/\\]$"):fixedDestdir = $${fixedDestdir}/
+ contains(QMAKE_HOST.os, "Windows"):fixedDestdir = $$replace(fixedDestdir, "/", "\\")
+} else {
+ fixedDestdir =
+}
+
+sis_target.target = sis
+sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ok_sis_target.target = ok_sis
+ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+target_sis_target.target = $${fixedDestdir}$${TARGET}.sis
+target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+installer_sis_target.target = installer_sis
+installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \
+ $(MAKE) -f $(MAKEFILE) ok_installer_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+installer_sis_target.depends = $${fixedDestdir}$${TARGET}.sis
+
+ok_installer_sis_target.target = ok_installer_sis
+ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+fail_sis_nopkg_target.target = fail_sis_nopkg
+fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)"
+
+fail_sis_nocache_target.target = fail_sis_nocache
+fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)"
+
+symbian-abld|symbian-sbsv2 {
+ # Only enable stub_sis files for the abld/sbsv2 build systems for now, since we don't
+ # support ROM builds for any other Symbian build system.
+ stub_sis_target.target = stub_sis
+ stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ ok_stub_sis_target.target = ok_stub_sis
+ ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ QMAKE_EXTRA_TARGETS += stub_sis_target \
+ ok_stub_sis_target
+} else {
+ # DESTDIR is not honored on abld and sbsv2
+ !isEmpty(DESTDIR) {
+ ok_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ ok_installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ }
+}
+
+QMAKE_EXTRA_TARGETS += sis_target \
+ ok_sis_target \
+ target_sis_target \
+ installer_sis_target \
+ ok_installer_sis_target \
+ fail_sis_nopkg_target \
+ fail_sis_nocache_target
+
+# Sbsv2 has its own store_build target which is using flms.
+!symbian-sbsv2 {
+ contains(QMAKE_HOST.os, "Windows") {
+ shellFixedHash = $${LITERAL_HASH}
+ } else {
+ shellFixedHash = \\$${LITERAL_HASH}
+ }
+ store_build_target.target = store_build
+ store_build_target.commands = \
+ @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \
+ && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \
+ && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \
+ && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \
+ && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \
+ && echo $${shellFixedHash} make sis target. >> $$make_cache_name \
+ && echo $${shellFixedHash} Version : >> $$make_cache_name \
+ && echo $${shellFixedHash} >> $$make_cache_name \
+ && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \
+ && echo. >> $$make_cache_name \
+ && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
+
+ QMAKE_EXTRA_TARGETS += store_build_target
+}
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5ebc8a2..10cbb8b 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -93,15 +93,6 @@
#define MMP_START_RESOURCE "START RESOURCE"
#define MMP_END_RESOURCE "END"
-#define SIS_TARGET "sis"
-#define INSTALLER_SIS_TARGET "installer_sis"
-#define ROM_STUB_SIS_TARGET "stub_sis"
-#define OK_SIS_TARGET "ok_sis"
-#define OK_INSTALLER_SIS_TARGET "ok_installer_sis"
-#define OK_ROM_STUB_SIS_TARGET "ok_stub_sis"
-#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
-#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
-
#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
@@ -1886,94 +1877,6 @@ void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
str.replace(QString(" "), QString("_"));
}
-void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
-{
- t << "-include " MAKE_CACHE_NAME << endl;
- t << endl;
-
- t << SIS_TARGET ":" << endl;
- QString siscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
- "$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(MAKE) -s -f $(MAKEFILE) %5))," \
- "$(MAKE) -s -f $(MAKEFILE) %6)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(MAKE_CACHE_NAME)
- .arg(OK_SIS_TARGET)
- .arg(FAIL_SIS_NOCACHE_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << siscommand << endl;
- t << endl;
-
- t << OK_SIS_TARGET ":" << endl;
-
- QString pkgcommand = QString::fromLatin1("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << pkgcommand << endl;
- t << endl;
-
- QString sisName = fixedTarget;
- sisName += ".sis";
-
- t << sisName << ":" << endl;
- t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl;
-
- t << ROM_STUB_SIS_TARGET ":" << endl;
- QString stubsiscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
- "$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(MAKE) -s -f $(MAKEFILE) %5))," \
- "$(MAKE) -s -f $(MAKEFILE) %6)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(MAKE_CACHE_NAME)
- .arg(OK_ROM_STUB_SIS_TARGET)
- .arg(FAIL_SIS_NOCACHE_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << stubsiscommand << endl;
- t << endl;
-
- t << OK_ROM_STUB_SIS_TARGET ":" << endl;
-
- QString stubpkgcommand = QString::fromLatin1("\tcreatepackage" SCRIPT_EXT " -s $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << stubpkgcommand << endl;
- t << endl;
-
- t << INSTALLER_SIS_TARGET ": " << sisName << endl;
- siscommand = QString::fromLatin1("\t$(if $(wildcard %1_installer.%2)," \
- "$(MAKE) -s -f $(MAKEFILE) %3," \
- "$(MAKE) -s -f $(MAKEFILE) %4)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(OK_INSTALLER_SIS_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << siscommand << endl;
- t << endl;
-
- t << OK_INSTALLER_SIS_TARGET ": " << endl;
-
- pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << pkgcommand << endl;
- t << endl;
-
- t << FAIL_SIS_NOPKG_TARGET ":" << endl;
- t << "\t$(error PKG file does not exist, '" SIS_TARGET "' and '" INSTALLER_SIS_TARGET "' target are only supported for executables or projects with DEPLOYMENT statement)" << endl;
- t << endl;
-
- t << FAIL_SIS_NOCACHE_TARGET ":" << endl;
- t << "\t$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" << endl;
- t << endl;
-}
-
void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
{
t << "dodistclean:" << endl;
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 77d61da..76fd98b 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -147,7 +147,6 @@ protected:
const QString& itemPrefix,
const QString& itemSuffix);
- void writeSisTargets(QTextStream &t);
void generateDistcleanTargets(QTextStream& t);
void generateExecutionTargets(QTextStream& t, const QStringList& platforms);
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index a3a504f..9b7ae3e 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -368,10 +368,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
writeDeploymentTargets(t);
- writeSisTargets(t);
-
- writeStoreBuildTarget(t);
-
generateDistcleanTargets(t);
t << "clean: $(ABLD)" << endl;
@@ -446,35 +442,6 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
return true;
}
-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 " 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)
{
// 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 25b06bb..d0f38b0 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -57,7 +57,6 @@ protected:
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
- 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 e081b19..f610181 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -231,8 +231,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
qDeleteAll(subtargets);
}
- writeSisTargets(t);
-
generateDistcleanTargets(t);
t << "clean: " << BLD_INF_FILENAME << endl;