diff options
Diffstat (limited to 'qmake/generators/symbian/symmake_abld.cpp')
-rw-r--r-- | qmake/generators/symbian/symmake_abld.cpp | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 271d210..49cd7ed 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() { } @@ -87,9 +88,15 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b t << "# ==============================================================================" << "\n" << endl; t << endl << endl; - + t << "MAKE = make" << endl; t << endl; + + t << "VISUAL_CFG = RELEASE" << endl; + t << "ifeq \"$(CFG)\" \"UDEB\"" << endl; + t << "VISUAL_CFG = DEBUG" << endl; + t << "endif" << endl; + t << endl; t << DO_NOTHING_TARGET " :" << endl; t << "\t" << "@rem " DO_NOTHING_TARGET << endl << endl; @@ -101,14 +108,16 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b QString finalDepsWinscw; QStringList wrapperTargets; if (deploymentOnly) { - buildDeps.append(DO_NOTHING_TARGET); + buildDeps.append(STORE_BUILD_TARGET); cleanDeps.append(DO_NOTHING_TARGET); cleanDepsWinscw.append(WINSCW_DEPLOYMENT_CLEAN_TARGET); finalDeps.append(DO_NOTHING_TARGET); finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET); - wrapperTargets << WINSCW_DEPLOYMENT_TARGET << WINSCW_DEPLOYMENT_CLEAN_TARGET; + wrapperTargets << WINSCW_DEPLOYMENT_TARGET + << WINSCW_DEPLOYMENT_CLEAN_TARGET + << STORE_BUILD_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 +127,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,9 +153,9 @@ 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 << " QT_SISX_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl; + } + t << endl; } // if(ft.open(QIODevice::WriteOnly)) } @@ -179,10 +189,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "#" << endl; t << "# ==============================================================================" << "\n" << endl; t << endl; - QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); - if (ofile.lastIndexOf(Option::dir_sep) != -1) - ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1); - t << "MAKEFILE = " << ofile << endl; + + t << "MAKEFILE = " << wrapperFile.fileName() << endl; t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; @@ -353,6 +361,10 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool writeDeploymentTargets(t); + writeSisxTargets(t); + + writeStoreBuildTarget(t); + generateDistcleanTargets(t); t << "clean: $(ABLD)" << endl; @@ -408,6 +420,25 @@ 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 QT_SISX_TARGET ?= $(QT_SISX_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 |