diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-07-11 15:14:13 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-07-11 16:42:01 +0200 |
commit | 3ef6cf060e984bca43956a23b61b32ec7347cfc7 (patch) | |
tree | 14810e4d0168c0cc3d69cb286574bf28375c07bc /qmake | |
parent | b06304e164ba47351fa292662c1e6383c081b5ca (diff) | |
parent | 7b9d6cf844ece18fef884f51117e25ad4ac31db5 (diff) |
Merge branch 'stable' into dev
Conflicts:
qmake/generators/mac/pbuilder_pbx.cpp
src/corelib/json/qjsonwriter.cpp
src/corelib/kernel/qeventdispatcher_blackberry.cpp
src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/Makefile.win32 | 4 | ||||
-rw-r--r-- | qmake/generators/integrity/gbuild.cpp | 52 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 686 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 56 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 140 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 32 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 22 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 15 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 98 | ||||
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 13 | ||||
-rw-r--r-- | qmake/library/qmakeglobals.cpp | 3 |
15 files changed, 579 insertions, 553 deletions
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 761cf78975..22375ef94a 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -1,4 +1,4 @@ -!IF "$(QMAKESPEC)" == "win32-msvc" || "$(QMAKESPEC)" == "win32-msvc.net" || "$(QMAKESPEC)" == "win32-msvc2002" || "$(QMAKESPEC)" == "win32-msvc2003" || "$(QMAKESPEC)" == "win32-msvc2005" || "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-icc" +!IF "$(QMAKESPEC)" == "win32-msvc" || "$(QMAKESPEC)" == "win32-msvc.net" || "$(QMAKESPEC)" == "win32-msvc2002" || "$(QMAKESPEC)" == "win32-msvc2003" || "$(QMAKESPEC)" == "win32-msvc2005" || "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013" || "$(QMAKESPEC)" == "win32-icc" !if "$(SOURCE_PATH)" == "" SOURCE_PATH = .. @@ -26,7 +26,7 @@ LINKER = link # !if "$(QMAKESPEC)" == "win32-msvc2005" CFLAGS_EXTRA = /Zc:wchar_t- -!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" +!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013" CFLAGS_EXTRA = /MP !endif diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index ace3558d7d..f6bd448cba 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -113,8 +113,8 @@ GBuildMakefileGenerator::write() /* this is for bulding an INTEGRITY application. * generate the .int integrate file and the .gpj INTEGRITY Application * project file, then go on with regular files */ - t << "#!gbuild" << "\n"; - t << "[INTEGRITY Application]" << "\n"; + t << "#!gbuild\n"; + t << "[INTEGRITY Application]\n"; t << "\t:binDirRelative=.\n"; t << "\t-o " << strtarget << "\n"; t << intname << "\n"; @@ -125,24 +125,24 @@ GBuildMakefileGenerator::write() QFile f(intname); f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate); QTextStream ti(&f); - ti << "# This is a file automatically generated by qmake" << "\n"; - ti << "# Modifications will be lost next time you run qmake" << "\n"; - ti << "Kernel" << "\n"; - ti << "\tFilename\tDynamicDownload" << "\n"; - ti << "EndKernel" << "\n" << "\n"; - ti << "AddressSpace" << "\n"; + ti << "# This is a file automatically generated by qmake\n"; + ti << "# Modifications will be lost next time you run qmake\n"; + ti << "Kernel\n"; + ti << "\tFilename\tDynamicDownload\n"; + ti << "EndKernel\n\n"; + ti << "AddressSpace\n"; ti << "\tName\t" << strtarget << "\n"; - ti << "\tFilename\t" << strtarget << "_app" << "\n"; - ti << "\tMemoryPoolSize\t0x100000" << "\n"; - ti << "\tLanguage\tC++" << "\n"; + ti << "\tFilename\t" << strtarget << "_app\n"; + ti << "\tMemoryPoolSize\t0x100000\n"; + ti << "\tLanguage\tC++\n"; /* FIXME : heap size is huge to be big enough for every example * it should probably be tailored for each example, btu there is no * good way to guess that */ - ti << "\tHeapSize\t0x00D00000" << "\n"; - ti << "\tTask\tInitial" << "\n"; - ti << "\t\tStackSize\t0x30000" << "\n"; - ti << "\tEndTask" << "\n"; - ti << "EndAddressSpace" << "\n"; + ti << "\tHeapSize\t0x00D00000\n"; + ti << "\tTask\tInitial\n"; + ti << "\t\tStackSize\t0x30000\n"; + ti << "\tEndTask\n"; + ti << "EndAddressSpace\n"; ti.flush(); /* change current project file to <projectname>_app.gpj and continue @@ -220,19 +220,19 @@ GBuildMakefileGenerator::write() filename.remove(qmake_getpwd()); //HEADER - t << "#!gbuild" << "\n"; + t << "#!gbuild\n"; /* find the architecture out of the compiler name */ if (filename.endsWith("projects.gpj")) { primaryTarget.remove(0, 5); t << "macro QT_BUILD_DIR=%expand_path(.)\n"; t << "macro __OS_DIR=" << project->values("INTEGRITY_DIR").first() << "\n"; - t << "primaryTarget=" << primaryTarget << "_integrity.tgt" << "\n"; + t << "primaryTarget=" << primaryTarget << "_integrity.tgt\n"; t << "customization=util/integrity/qt.bod\n"; } /* project type */ if (project->first("TEMPLATE") == "app") { - t << "[Program]" << "\n"; + t << "[Program]\n"; if (isnativebin) { t << "\t:binDir=bin\n"; t << "\t-o " << strtarget << "\n"; @@ -241,16 +241,16 @@ GBuildMakefileGenerator::write() t << "\t-o " << strtarget << "_app\n"; } } else if (project->first("TEMPLATE") == "lib") { - t << "[Library]" << "\n"; - t << "\t:binDir=lib" << "\n"; - t << "\t-o lib" << strtarget << ".a" << "\n"; + t << "[Library]\n"; + t << "\t:binDir=lib\n"; + t << "\t-o lib" << strtarget << ".a\n"; } else if (project->first("TEMPLATE") == "subdirs") - t << "[Project]" << "\n"; + t << "[Project]\n"; else t << project->first("TEMPLATE") << "\n"; /* compilations options */ - t << "\t:sourceDir=." << "\n"; + t << "\t:sourceDir=.\n"; t << "\t:outputDir=work" << relpath << "\n"; if (filename.endsWith("projects.gpj")) { @@ -261,7 +261,7 @@ GBuildMakefileGenerator::write() const ProStringList &l = project->values("QMAKE_CXXFLAGS"); for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if ((*it).startsWith("-")) - t << "\n" << "\t" << (*it); + t << "\n\t" << (*it); else t << " " << (*it); } @@ -287,7 +287,7 @@ GBuildMakefileGenerator::write() const ProStringList &l = project->values(src[i]); for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if ((*it).startsWith("-")) - t << "\n" << "\t" << (*it); + t << "\n\t" << (*it); else t << " " << (*it); } diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index f0e139b137..b4ae89c0a9 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -126,12 +126,12 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) //HEADER const int pbVersion = pbuilderVersion(); - t << "// !$*UTF8*$!" << "\n" - << "{" << "\n" - << "\t" << writeSettings("archiveVersion", "1", SettingsNoQuote) << ";" << "\n" - << "\t" << "classes = {" << "\n" << "\t" << "};" << "\n" - << "\t" << writeSettings("objectVersion", QString::number(pbVersion), SettingsNoQuote) << ";" << "\n" - << "\t" << "objects = {" << endl; + t << "// !$*UTF8*$!\n" + << "{\n" + << "\t" << writeSettings("archiveVersion", "1", SettingsNoQuote) << ";\n" + << "\tclasses = {\n\t};\n" + << "\t" << writeSettings("objectVersion", QString::number(pbVersion), SettingsNoQuote) << ";\n" + << "\tobjects = {\n"; //SUBDIRS QList<ProjectBuilderSubDirs*> pb_subdirs; @@ -220,60 +220,60 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) } if(in_root) project->values("QMAKE_SUBDIR_PBX_GROUPS") += project_key; - t << "\t\t" << project_key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.pb-project") << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(tmp_proj.first("TARGET") + projectSuffix())) << ";" << "\n" - << "\t\t\t" << writeSettings("path", pbxproj) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << project_key << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.pb-project") << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(tmp_proj.first("TARGET") + projectSuffix())) << ";\n" + << "\t\t\t" << writeSettings("path", pbxproj) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<absolute>") << ";\n" + << "\t\t};\n"; //WRAPPER - t << "\t\t" << keyFor(pbxproj + "_WRAPPER") << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXReferenceProxy", SettingsNoQuote) << ";" << "\n"; + t << "\t\t" << keyFor(pbxproj + "_WRAPPER") << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXReferenceProxy", SettingsNoQuote) << ";\n"; if(tmp_proj.first("TEMPLATE") == "app") { - t << "\t\t\t" << writeSettings("fileType", "wrapper.application") << ";" << "\n" - << "\t\t\t" << writeSettings("path", tmp_proj.first("TARGET") + ".app") << ";" << "\n"; + t << "\t\t\t" << writeSettings("fileType", "wrapper.application") << ";\n" + << "\t\t\t" << writeSettings("path", tmp_proj.first("TARGET") + ".app") << ";\n"; } else { - t << "\t\t\t" << writeSettings("fileType", "compiled.mach-o.dylib") << ";" << "\n" - << "\t\t\t" << writeSettings("path", tmp_proj.first("TARGET") + ".dylib") << ";" << "\n"; + t << "\t\t\t" << writeSettings("fileType", "compiled.mach-o.dylib") << ";\n" + << "\t\t\t" << writeSettings("path", tmp_proj.first("TARGET") + ".dylib") << ";\n"; } - t << "\t\t\t" << writeSettings("remoteRef", keyFor(pbxproj + "_WRAPPERREF")) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "};" << "\n"; - t << "\t\t" << keyFor(pbxproj + "_WRAPPERREF") << " = {" << "\n" - << "\t\t\t" << writeSettings("containerPortal", project_key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXContainerItemProxy", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("proxyType", "2") << ";" << "\n" -// << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_REFERENCE")) << ";" << "\n" - << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_REFERENCE!!!")) << ";" << "\n" - << "\t\t\t" << writeSettings("remoteInfo", tmp_proj.first("TARGET")) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("remoteRef", keyFor(pbxproj + "_WRAPPERREF")) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";\n" + << "\t\t};\n"; + t << "\t\t" << keyFor(pbxproj + "_WRAPPERREF") << " = {\n" + << "\t\t\t" << writeSettings("containerPortal", project_key) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXContainerItemProxy", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("proxyType", "2") << ";\n" +// << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_REFERENCE")) << ";\n" + << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_REFERENCE!!!")) << ";\n" + << "\t\t\t" << writeSettings("remoteInfo", tmp_proj.first("TARGET")) << ";\n" + << "\t\t};\n"; //PRODUCTGROUP - t << "\t\t" << keyFor(pbxproj + "_PRODUCTGROUP") << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values(ProKey(pbxproj + "_WRAPPER")), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Products") << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor(pbxproj + "_PRODUCTGROUP") << " = {\n" + << "\t\t\t" << writeSettings("children", project->values(ProKey(pbxproj + "_WRAPPER")), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Products") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<group>") << ";\n" + << "\t\t};\n"; } #ifdef GENERATE_AGGREGRATE_SUBDIR //TARGET (for aggregate) { //container const QString container_proxy = keyFor(pbxproj + "_CONTAINERPROXY"); - t << "\t\t" << container_proxy << " = {" << "\n" - << "\t\t\t" << writeSettings("containerPortal", project_key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXContainerItemProxy", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("proxyType", "1") << ";" << "\n" - << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_TARGET")) << ";" << "\n" - << "\t\t\t" << writeSettings("remoteInfo", tmp_proj.first("TARGET")) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << container_proxy << " = {\n" + << "\t\t\t" << writeSettings("containerPortal", project_key) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXContainerItemProxy", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("proxyType", "1") << ";\n" + << "\t\t\t" << writeSettings("remoteGlobalIDString", keyFor(pbxproj + "QMAKE_PBX_TARGET")) << ";\n" + << "\t\t\t" << writeSettings("remoteInfo", tmp_proj.first("TARGET")) << ";\n" + << "\t\t};\n"; //targetref - t << "\t\t" << keyFor(pbxproj + "_TARGETREF") << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXTargetDependency", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", fixForOutput(tmp_proj.first("TARGET") +" (from " + tmp_proj.first("TARGET") + projectSuffix() + ")")) << ";" << "\n" - << "\t\t\t" << writeSettings("targetProxy", container_proxy) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor(pbxproj + "_TARGETREF") << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXTargetDependency", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", fixForOutput(tmp_proj.first("TARGET") +" (from " + tmp_proj.first("TARGET") + projectSuffix() + ")")) << ";\n" + << "\t\t\t" << writeSettings("targetProxy", container_proxy) << ";\n" + << "\t\t};\n"; } #endif } @@ -288,12 +288,12 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) pb_subdirs.clear(); for (QMap<QString, ProStringList>::Iterator grp_it = groups.begin(); grp_it != groups.end(); ++grp_it) { - t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor(grp_it.key()) << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; } //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER @@ -324,84 +324,84 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) defaultConfig = name; QString key = keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_" + name); project->values("QMAKE_SUBDIR_PBX_BUILDCONFIGS").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "XCBuildConfiguration", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("isa", "XCBuildConfiguration", SettingsNoQuote) << ";\n" + << "\t\t\tbuildSettings = {\n"; for (QMap<QString, QString>::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it) - t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";" << "\n"; - t << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("name", name) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";\n"; + t << "\t\t\t};\n" + << "\t\t\t" << writeSettings("name", name) << ";\n" + << "\t\t};\n"; } - t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST") << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("buildConfigurations", project->values("QMAKE_SUBDIR_PBX_BUILDCONFIGS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig, SettingsNoQuote) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST") << " = {\n" + << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("buildConfigurations", project->values("QMAKE_SUBDIR_PBX_BUILDCONFIGS"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig, SettingsNoQuote) << ";\n" + << "\t\t};\n"; #ifdef GENERATE_AGGREGRATE_SUBDIR //target - t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_AGGREGATE_TARGET") << " = {" << "\n" - << "\t\t\t" << writeSettings("buildPhases", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n" - << "\t\t\t\t" << writeSettings("PRODUCT_NAME", project->values("TARGET").first()) << ";" << "\n" - << "\t\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_AGGREGATE_TARGET") << " = {\n" + << "\t\t\t" << writeSettings("buildPhases", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\tbuildSettings = {\n" + << "\t\t\t\t" << writeSettings("PRODUCT_NAME", project->values("TARGET").first()) << ";\n" + << "\t\t\t};\n"; { ProStringList dependencies; const ProStringList &qmake_subdirs = project->values("QMAKE_PBX_SUBDIRS"); for(int i = 0; i < qmake_subdirs.count(); i++) dependencies += keyFor(qmake_subdirs[i] + "_TARGETREF"); - t << "\t\t\t" << writeSettings("dependencies", dependencies, SettingsAsList, 4) << ";" << "\n" + t << "\t\t\t" << writeSettings("dependencies", dependencies, SettingsAsList, 4) << ";\n" } - t << "\t\t\t" << writeSettings("isa", "PBXAggregateTarget", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", project->values("TARGET").first()) << ";" << "\n" - << "\t\t\t" << writeSettings("productName", project->values("TARGET").first()) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("isa", "PBXAggregateTarget", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", project->values("TARGET").first()) << ";\n" + << "\t\t\t" << writeSettings("productName", project->values("TARGET").first()) << ";\n" + << "\t\t};\n"; #endif //ROOT_GROUP - t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_ROOT_GROUP") << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values("QMAKE_SUBDIR_PBX_GROUPS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_ROOT_GROUP") << " = {\n" + << "\t\t\t" << writeSettings("children", project->values("QMAKE_SUBDIR_PBX_GROUPS"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<group>") << ";\n" + << "\t\t};\n"; //ROOT - t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_ROOT") << " = {" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n" - << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("buildStyles", project->values("QMAKE_SUBDIR_PBX_BUILDSTYLES"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXProject", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_SUBDIR_PBX_ROOT_GROUP")) << ";" << "\n" - << "\t\t\t" << writeSettings("projectDirPath", ProStringList()) << ";" << "\n"; - t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST")) << ";" << "\n"; - t << "\t\t\t" << "projectReferences = (" << "\n"; + t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_ROOT") << " = {\n" + << "\t\t\tbuildSettings = {\n" + << "\t\t\t};\n" + << "\t\t\t" << writeSettings("buildStyles", project->values("QMAKE_SUBDIR_PBX_BUILDSTYLES"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXProject", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_SUBDIR_PBX_ROOT_GROUP")) << ";\n" + << "\t\t\t" << writeSettings("projectDirPath", ProStringList()) << ";\n"; + t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST")) << ";\n"; + t << "\t\t\tprojectReferences = (\n"; { const ProStringList &qmake_subdirs = project->values("QMAKE_PBX_SUBDIRS"); for(int i = 0; i < qmake_subdirs.count(); i++) { const ProString &subdir = qmake_subdirs[i]; - t << "\t\t\t\t" << "{" << "\n" - << "\t\t\t\t\t" << writeSettings("ProductGroup", keyFor(subdir + "_PRODUCTGROUP")) << ";" << "\n" - << "\t\t\t\t\t" << writeSettings("ProjectRef", keyFor(subdir + "_PROJECTREF")) << ";" << "\n" - << "\t\t\t\t" << "}," << "\n"; + t << "\t\t\t\t{\n" + << "\t\t\t\t\t" << writeSettings("ProductGroup", keyFor(subdir + "_PRODUCTGROUP")) << ";\n" + << "\t\t\t\t\t" << writeSettings("ProjectRef", keyFor(subdir + "_PROJECTREF")) << ";\n" + << "\t\t\t\t},\n"; } } - t << "\t\t\t" << ");" << "\n" + t << "\t\t\t);\n" << "\t\t\t" << writeSettings("targets", #ifdef GENERATE_AGGREGRATE_SUBDIR project->values("QMAKE_SUBDIR_AGGREGATE_TARGET"), #else ProStringList(), #endif - SettingsAsList, 4) << ";" << "\n" - << "\t\t" << "};" << "\n"; + SettingsAsList, 4) << ";\n" + << "\t\t};\n"; //FOOTER - t << "\t" << "};" << "\n" - << "\t" << writeSettings("rootObject", keyFor("QMAKE_SUBDIR_PBX_ROOT")) << ";" << "\n" - << "}" << endl; + t << "\t};\n" + << "\t" << writeSettings("rootObject", keyFor("QMAKE_SUBDIR_PBX_ROOT")) << ";\n" + << "}\n"; return true; } @@ -516,14 +516,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) //HEADER const int pbVersion = pbuilderVersion(); ProStringList buildConfigGroups; - buildConfigGroups << "PROJECT" << "TARGET"; + buildConfigGroups << "PROJECTTARGET"; - t << "// !$*UTF8*$!" << "\n" - << "{" << "\n" - << "\t" << writeSettings("archiveVersion", "1", SettingsNoQuote) << ";" << "\n" - << "\t" << "classes = {" << "\n" << "\t" << "};" << "\n" - << "\t" << writeSettings("objectVersion", QString::number(pbVersion), SettingsNoQuote) << ";" << "\n" - << "\t" << "objects = {" << endl; + t << "// !$*UTF8*$!\n" + << "{\n" + << "\t" << writeSettings("archiveVersion", "1", SettingsNoQuote) << ";\n" + << "\tclasses = {\n\t};\n" + << "\t" << writeSettings("objectVersion", QString::number(pbVersion), SettingsNoQuote) << ";\n" + << "\tobjects = {\n"; //MAKE QMAKE equivelant if (!project->isActiveConfig("no_autoqmake")) { @@ -545,15 +545,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE"); mkfile = fileFixify(mkfile, qmake_getpwd()); project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); - t << "\t\t" << phase_key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Qt Qmake") << ";" << "\n" - << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" - << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << phase_key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Qt Qmake") << ";\n" + << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n" + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n" + << "\t\t};\n"; } // FIXME: Move all file resolving logic out of ProjectBuilderSources::files(), as it @@ -664,25 +664,25 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) src_list.append(src_key); } //source reference - t << "\t\t" << src_key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("path", escapeFilePath(file)) << ";" << "\n"; + t << "\t\t" << src_key << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("path", escapeFilePath(file)) << ";\n"; if (name != file) - t << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n"; - t << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(file)) << ";" << "\n"; + t << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";\n"; + t << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(file)) << ";\n"; QString filetype = xcodeFiletypeForFilename(file); if (!filetype.isNull()) - t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";" << "\n"; - t << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";\n"; + t << "\t\t};\n"; if (sources.at(source).isBuildable() && sources.at(source).isObjectOutput(file)) { //build reference QString build_key = keyFor(file + ".BUILDABLE"); - t << "\t\t" << build_key << " = {" << "\n" - << "\t\t\t" << writeSettings("fileRef", src_key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "settings = {" << "\n" - << "\t\t\t\t" << writeSettings("ATTRIBUTES", ProStringList(), SettingsAsList, 5) << ";" << "\n" - << "\t\t\t" << "};" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << build_key << " = {\n" + << "\t\t\t" << writeSettings("fileRef", src_key) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";\n" + << "\t\t\tsettings = {\n" + << "\t\t\t\t" << writeSettings("ATTRIBUTES", ProStringList(), SettingsAsList, 5) << ";\n" + << "\t\t\t};\n" + << "\t\t};\n"; project->values("QMAKE_PBX_OBJ").append(build_key); } } @@ -699,12 +699,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } for (QMap<QString, ProStringList>::Iterator grp_it = groups.begin(); grp_it != groups.end(); ++grp_it) { - t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor(grp_it.key()) << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; } //PREPROCESS BUILDPHASE (just a makefile) @@ -726,7 +726,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) mkt << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") << varGlue("DEFINES","-D"," -D","") << endl; - mkt << "INCPATH = " << "-I" << specdir(); + mkt << "INCPATH = -I" << specdir(); if(!project->isActiveConfig("no_include_pwd")) { QString pwd = escapeFilePath(fileFixify(qmake_getpwd())); if(pwd.isEmpty()) @@ -736,7 +736,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) { const ProStringList &incs = project->values("INCLUDEPATH"); for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) - mkt << " " << "-I" << escapeFilePath((*incit)); + mkt << " -I" << escapeFilePath((*incit)); } if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS")) mkt << " " << var("QMAKE_FRAMEWORKPATH_FLAGS"); @@ -762,11 +762,11 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } mkt << "\n"; - mkt << "preprocess: $(PARSERS) compilers" << endl; - mkt << "clean preprocess_clean: parser_clean compiler_clean" << endl << endl; - mkt << "parser_clean:" << "\n"; + mkt << "preprocess: $(PARSERS) compilers\n"; + mkt << "clean preprocess_clean: parser_clean compiler_clean\n\n"; + mkt << "parser_clean:\n"; if(!project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) - mkt << "\t-rm -f $(PARSERS)" << "\n"; + mkt << "\t-rm -f $(PARSERS)\n"; writeExtraTargets(mkt); if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) { mkt << "compilers:"; @@ -803,28 +803,28 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET"); // project->values("QMAKE_PBX_BUILDPHASES").append(phase_key); project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); - t << "\t\t" << phase_key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";" << "\n" - << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" - << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << phase_key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";\n" + << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n" + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n" + << "\t\t};\n"; } //SOURCE BUILDPHASE if(!project->isEmpty("QMAKE_PBX_OBJ")) { QString grp = "Compile Sources", key = keyFor(grp); project->values("QMAKE_PBX_BUILDPHASES").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXSourcesBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", grp) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXSourcesBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", grp) << ";\n" + << "\t\t};\n"; } if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES @@ -934,23 +934,23 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString key = keyFor(library); if (!project->values("QMAKE_PBX_LIBRARIES").contains(key)) { bool is_frmwrk = (library.endsWith(".framework")); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n" - << "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(library)), SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";\n" + << "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";\n" + << "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(library)), SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";\n"; if (is_frmwrk) - t << "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.framework") << ";" << "\n"; - t << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.framework") << ";\n"; + t << "\t\t};\n"; project->values("QMAKE_PBX_LIBRARIES").append(key); QString build_key = keyFor(library + ".BUILDABLE"); - t << "\t\t" << build_key << " = {" << "\n" - << "\t\t\t" << writeSettings("fileRef", key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "settings = {" << "\n" - << "\t\t\t" << "};" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << build_key << " = {\n" + << "\t\t\t" << writeSettings("fileRef", key) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";\n" + << "\t\t\tsettings = {\n" + << "\t\t\t};\n" + << "\t\t};\n"; project->values("QMAKE_PBX_BUILD_LIBRARIES").append(build_key); } } @@ -976,10 +976,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) for(int i = 0; i < tmp.count(); i++) t << "tmp/lib" << tmp[i] << ".a "; t << endl << endl; - mkt << "sublibs: $(SUBLIBS)" << endl << endl; + mkt << "sublibs: $(SUBLIBS)\n\n"; tmp = project->values("SUBLIBS"); for(int i = 0; i < tmp.count(); i++) - t << "tmp/lib" << tmp[i] << ".a" << ":\n\t" + t << "tmp/lib" << tmp[i] << ".a:\n\t" << var(ProKey("MAKELIB" + tmp[i])) << endl << endl; mkt.flush(); mkf.close(); @@ -988,15 +988,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString phase_key = keyFor("QMAKE_PBX_SUBLIBS_BUILDPHASE"); mkfile = fileFixify(mkfile, qmake_getpwd()); project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); - t << "\t\t" << phase_key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Qt Sublibs") << ";" << "\n" + t << "\t\t" << phase_key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Qt Sublibs") << ";\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << "\n" - << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n" + << "\t\t};\n"; } //LIBRARY BUILDPHASE if(!project->isEmpty("QMAKE_PBX_LIBRARIES")) { @@ -1004,24 +1004,24 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if(!tmp.isEmpty()) { QString grp("Frameworks"), key = keyFor(grp); project->values("QMAKE_PBX_GROUPS").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; } } { QString grp("Link Binary With Libraries"), key = keyFor(grp); project->values("QMAKE_PBX_BUILDPHASES").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", project->values("QMAKE_PBX_BUILD_LIBRARIES"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFrameworksBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", project->values("QMAKE_PBX_BUILD_LIBRARIES"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXFrameworksBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n" + << "\t\t};\n"; } if (!project->isEmpty("DESTDIR")) { QString phase_key = keyFor("QMAKE_PBX_TARGET_COPY_PHASE"); @@ -1030,16 +1030,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) destDir = fileInfo(Option::fixPathToLocalOS(destDir)).absoluteFilePath(); project->values("QMAKE_PBX_BUILDPHASES").append(phase_key); t << "\t\t" << phase_key << " = {\n" - << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Project Copy") << ";" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("inputPaths", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("outputPaths", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" - << "\t\t\t" << writeSettings("shellScript", fixForOutput("cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME " + escapeFilePath(destDir))) << ";" << "\n" - << "\t\t" << "};\n"; + << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Project Copy") << ";\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("inputPaths", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("outputPaths", ProStringList(), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n" + << "\t\t\t" << writeSettings("shellScript", fixForOutput("cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME " + escapeFilePath(destDir))) << ";\n" + << "\t\t};\n"; } // Copy Bundle Resources if (!project->isEmpty("QMAKE_BUNDLE_DATA")) { @@ -1059,17 +1059,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString fn = files[file].toQString(); QString file_ref_key = keyFor("QMAKE_PBX_BUNDLE_DATA_FILE_REF." + bundle_data[i] + "-" + fn); bundle_file_refs += file_ref_key; - t << "\t\t" << file_ref_key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("path", escapeFilePath(fn)) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(fn)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << file_ref_key << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("path", escapeFilePath(fn)) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(fn)) << ";\n" + << "\t\t};\n"; QString file_key = keyFor("QMAKE_PBX_BUNDLE_DATA_FILE." + bundle_data[i] + "-" + fn); bundle_files += file_key; t << "\t\t" << file_key << " = {\n" - << "\t\t\t" << writeSettings("fileRef", file_ref_key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "}" << ";" << "\n"; + << "\t\t\t" << writeSettings("fileRef", file_ref_key) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";\n" + << "\t\t};\n"; } if (!useCopyResourcesPhase || !path.isEmpty()) { @@ -1082,14 +1082,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); t << "\t\t" << phase_key << " = {\n" - << "\t\t\t" << writeSettings("name", "Copy '" + bundle_data[i] + "' Files to Bundle") << ";" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("dstPath", escapeFilePath(path)) << ";" << "\n" - << "\t\t\t" << writeSettings("dstSubfolderSpec", "1", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", bundle_files, SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXCopyFilesBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "}" << ";" << "\n"; + << "\t\t\t" << writeSettings("name", "Copy '" + bundle_data[i] + "' Files to Bundle") << ";\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("dstPath", escapeFilePath(path)) << ";\n" + << "\t\t\t" << writeSettings("dstSubfolderSpec", "1", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", bundle_files, SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXCopyFilesBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t};\n"; } else { // Otherwise we leave it to the resource copy phase below bundle_resources_files += bundle_files; @@ -1107,30 +1107,30 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString grp("Copy Bundle Resources"), key = keyFor(grp); project->values("QMAKE_PBX_BUILDPHASES").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n" + << "\t\t};\n"; } QString bundle_data_key = keyFor("QMAKE_PBX_BUNDLE_DATA"); project->values("QMAKE_PBX_GROUPS").append(bundle_data_key); - t << "\t\t" << bundle_data_key << " = {" << "\n" - << "\t\t\t" << writeSettings("children", bundle_file_refs, SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Bundle Resources") << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << bundle_data_key << " = {\n" + << "\t\t\t" << writeSettings("children", bundle_file_refs, SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Bundle Resources") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; } //REFERENCE project->values("QMAKE_PBX_PRODUCTS").append(keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")); - t << "\t\t" << keyFor(pbx_dir + "QMAKE_PBX_REFERENCE") << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("includeInIndex", "0", SettingsNoQuote) << ";" << "\n"; + t << "\t\t" << keyFor(pbx_dir + "QMAKE_PBX_REFERENCE") << " = {\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("includeInIndex", "0", SettingsNoQuote) << ";\n"; if(project->first("TEMPLATE") == "app") { ProString targ = project->first("QMAKE_ORIG_TARGET"); if(project->isActiveConfig("bundle") && !project->isEmpty("QMAKE_BUNDLE_EXTENSION")) { @@ -1138,18 +1138,18 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) targ = project->first("QMAKE_BUNDLE_NAME"); targ += project->first("QMAKE_BUNDLE_EXTENSION"); if(!project->isEmpty("QMAKE_PBX_BUNDLE_TYPE")) - t << "\t\t\t" << writeSettings("explicitFileType", project->first("QMAKE_PBX_BUNDLE_TYPE")) + ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", project->first("QMAKE_PBX_BUNDLE_TYPE")) + ";\n"; } else if(project->isActiveConfig("app_bundle")) { if(!project->isEmpty("QMAKE_APPLICATION_BUNDLE_NAME")) targ = project->first("QMAKE_APPLICATION_BUNDLE_NAME"); targ += ".app"; - t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.application") << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.application") << ";\n"; } else { - t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.executable") << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.executable") << ";\n"; } QString app = (!project->isEmpty("DESTDIR") ? project->first("DESTDIR") + project->first("QMAKE_ORIG_TARGET") : qmake_getpwd()) + Option::dir_sep + targ; - t << "\t\t\t" << writeSettings("path", escapeFilePath(targ)) << ";" << "\n"; + t << "\t\t\t" << writeSettings("path", escapeFilePath(targ)) << ";\n"; } else { ProString lib = project->first("QMAKE_ORIG_TARGET"); if(project->isActiveConfig("staticlib")) { @@ -1168,79 +1168,79 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) lib = project->first("QMAKE_BUNDLE_NAME"); lib += project->first("QMAKE_BUNDLE_EXTENSION"); if(!project->isEmpty("QMAKE_PBX_BUNDLE_TYPE")) - t << "\t\t\t" << writeSettings("explicitFileType", project->first("QMAKE_PBX_BUNDLE_TYPE")) << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", project->first("QMAKE_PBX_BUNDLE_TYPE")) << ";\n"; } else if(!project->isActiveConfig("staticlib") && project->isActiveConfig("lib_bundle")) { if(!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME")) lib = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME"); lib += ".framework"; - t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.framework") << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.framework") << ";\n"; } else { - t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.dylib") << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.dylib") << ";\n"; } - t << "\t\t\t" << writeSettings("path", escapeFilePath(lib)) << ";" << "\n"; + t << "\t\t\t" << writeSettings("path", escapeFilePath(lib)) << ";\n"; } - t << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";\n" + << "\t\t};\n"; { //Products group QString grp("Products"), key = keyFor(grp); project->values("QMAKE_PBX_GROUPS").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_PRODUCTS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Products") << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_PRODUCTS"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", "Products") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; } //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER //ROOT_GROUP - t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {\n" + << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n" + << "\t\t};\n"; //TARGET QString target_key = keyFor(pbx_dir + "QMAKE_PBX_TARGET"); project->values("QMAKE_PBX_TARGETS").append(target_key); - t << "\t\t" << target_key << " = {" << "\n" + t << "\t\t" << target_key << " = {\n" << "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES") + project->values("QMAKE_PBX_BUILDPHASES"), - SettingsAsList, 4) << ";" << "\n"; - t << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";" << "\n"; - t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_TARGET"), SettingsNoQuote) << ";" << "\n"; - t << "\t\t\t" << writeSettings("isa", "PBXNativeTarget", SettingsNoQuote) << ";" << "\n"; - t << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList) << ";" << "\n"; + SettingsAsList, 4) << ";\n"; + t << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";\n"; + t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_TARGET"), SettingsNoQuote) << ";\n"; + t << "\t\t\t" << writeSettings("isa", "PBXNativeTarget", SettingsNoQuote) << ";\n"; + t << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList) << ";\n"; if(project->first("TEMPLATE") == "app") { if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE")) { - t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";\n"; } else { if (project->isActiveConfig("app_bundle")) - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.application") << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.application") << ";\n"; else - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.tool") << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.tool") << ";\n"; } - t << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n" - << "\t\t\t" << writeSettings("productName", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n"; + t << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n" + << "\t\t\t" << writeSettings("productName", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";\n"; } else { ProString lib = project->first("QMAKE_ORIG_TARGET"); if(!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib")) lib.prepend("lib"); - t << "\t\t\t" << writeSettings("name", escapeFilePath(lib)) << ";" << "\n" - << "\t\t\t" << writeSettings("productName", escapeFilePath(lib)) << ";" << "\n"; + t << "\t\t\t" << writeSettings("name", escapeFilePath(lib)) << ";\n" + << "\t\t\t" << writeSettings("productName", escapeFilePath(lib)) << ";\n"; if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE")) - t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";\n"; else if (project->isActiveConfig("staticlib")) - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.static") << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.static") << ";\n"; else if (project->isActiveConfig("lib_bundle")) - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.framework") << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.framework") << ";\n"; else - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.dynamic") << ";" << "\n"; + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.dynamic") << ";\n"; } if(!project->isEmpty("DESTDIR")) - t << "\t\t\t" << writeSettings("productInstallPath", escapeFilePath(project->first("DESTDIR"))) << ";" << "\n"; - t << "\t\t" << "};" << "\n"; + t << "\t\t\t" << writeSettings("productInstallPath", escapeFilePath(project->first("DESTDIR"))) << ";\n"; + t << "\t\t};\n"; //DEBUG/RELEASE QString defaultConfig; for(int as_release = 0; as_release < 2; as_release++) @@ -1278,25 +1278,25 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) for (int i = 0; i < buildConfigGroups.size(); i++) { QString key = keyFor("QMAKE_PBX_BUILDCONFIG_" + name + buildConfigGroups.at(i)); project->values(ProKey("QMAKE_PBX_BUILDCONFIGS_" + buildConfigGroups.at(i))).append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "XCBuildConfiguration", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n"; + t << "\t\t" << key << " = {\n" + << "\t\t\t" << writeSettings("isa", "XCBuildConfiguration", SettingsNoQuote) << ";\n" + << "\t\t\tbuildSettings = {\n"; for (QMap<QString, QString>::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it) t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";\n"; if (buildConfigGroups.at(i) == QLatin1String("PROJECT")) { if (!project->isEmpty("QMAKE_XCODE_GCC_VERSION")) - t << "\t\t\t\t" << writeSettings("GCC_VERSION", project->first("QMAKE_XCODE_GCC_VERSION"), SettingsNoQuote) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("GCC_VERSION", project->first("QMAKE_XCODE_GCC_VERSION"), SettingsNoQuote) << ";\n"; ProString program = project->first("QMAKE_CC"); if (!program.isEmpty()) - t << "\t\t\t\t" << writeSettings("CC", fixForOutput(findProgram(program))) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("CC", fixForOutput(findProgram(program))) << ";\n"; program = project->first("QMAKE_CXX"); // Xcode will automatically take care of using CC with the right -x option, // and will actually break if we pass CPLUSPLUS, by adding an additional set of "++" if (!program.isEmpty() && !program.contains("clang++")) - t << "\t\t\t\t" << writeSettings("CPLUSPLUS", fixForOutput(findProgram(program))) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("CPLUSPLUS", fixForOutput(findProgram(program))) << ";\n"; program = project->first("QMAKE_LINK"); if (!program.isEmpty()) - t << "\t\t\t\t" << writeSettings("LDPLUSPLUS", fixForOutput(findProgram(program))) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("LDPLUSPLUS", fixForOutput(findProgram(program))) << ";\n"; if ((project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) || (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && @@ -1328,58 +1328,58 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if (plist_out_file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream plist_out(&plist_out_file); plist_out << plist_in_text; - t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";\n"; } } } } - t << "\t\t\t\t" << writeSettings("SYMROOT", escapeFilePath(qmake_getpwd())) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("SYMROOT", escapeFilePath(qmake_getpwd())) << ";\n"; if (!project->isEmpty("DESTDIR")) { ProString dir = project->first("DESTDIR"); if (QDir::isRelativePath(dir.toQString())) dir.prepend(qmake_getpwd() + Option::dir_sep); - t << "\t\t\t\t" << writeSettings("INSTALL_DIR", dir) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("INSTALL_DIR", dir) << ";\n"; } if (project->first("TEMPLATE") == "lib") - t << "\t\t\t\t" << writeSettings("INSTALL_PATH", ProStringList()) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("INSTALL_PATH", ProStringList()) << ";\n"; if (!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") { - t << "\t\t\t\t" << writeSettings("DYLIB_CURRENT_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")+"."+project->first("VER_PAT")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("DYLIB_CURRENT_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")+"."+project->first("VER_PAT")) << ";\n"; if (project->isEmpty("COMPAT_VERSION")) - t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")) << ";\n"; if (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && project->isActiveConfig("lib_bundle")) - t << "\t\t\t\t" << writeSettings("FRAMEWORK_VERSION", project->first("QMAKE_FRAMEWORK_VERSION")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("FRAMEWORK_VERSION", project->first("QMAKE_FRAMEWORK_VERSION")) << ";\n"; } if (!project->isEmpty("COMPAT_VERSION")) - t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";\n"; if (!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) - t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";\n"; if (!project->isEmpty("QMAKE_IOS_DEPLOYMENT_TARGET")) - t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IOS_DEPLOYMENT_TARGET")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IOS_DEPLOYMENT_TARGET")) << ";\n"; if (!project->isEmpty("QMAKE_XCODE_CODE_SIGN_IDENTITY")) - t << "\t\t\t\t" << writeSettings("CODE_SIGN_IDENTITY", project->first("QMAKE_XCODE_CODE_SIGN_IDENTITY")) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("CODE_SIGN_IDENTITY", project->first("QMAKE_XCODE_CODE_SIGN_IDENTITY")) << ";\n"; tmp = project->values("QMAKE_PBX_VARS"); for (int i = 0; i < tmp.count(); i++) { QString var = tmp[i].toQString(), val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData())); if (val.isEmpty() && var == "TB") val = "/usr/bin/"; - t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";\n"; } if (!project->isEmpty("PRECOMPILED_HEADER")) { - t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";" << "\n" - << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";\n" + << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";\n"; } - t << "\t\t\t\t" << writeSettings("HEADER_SEARCH_PATHS", fixListForOutput("INCLUDEPATH") + ProStringList(fixForOutput(specdir())), SettingsAsList, 5) << ";" << "\n" - << "\t\t\t\t" << writeSettings("LIBRARY_SEARCH_PATHS", fixListForOutput("QMAKE_PBX_LIBPATHS"), SettingsAsList, 5) << ";" << "\n" + t << "\t\t\t\t" << writeSettings("HEADER_SEARCH_PATHS", fixListForOutput("INCLUDEPATH") + ProStringList(fixForOutput(specdir())), SettingsAsList, 5) << ";\n" + << "\t\t\t\t" << writeSettings("LIBRARY_SEARCH_PATHS", fixListForOutput("QMAKE_PBX_LIBPATHS"), SettingsAsList, 5) << ";\n" << "\t\t\t\t" << writeSettings("FRAMEWORK_SEARCH_PATHS", fixListForOutput("QMAKE_FRAMEWORKPATH"), - !project->values("QMAKE_FRAMEWORKPATH").isEmpty() ? SettingsAsList : 0, 5) << ";" << "\n"; + !project->values("QMAKE_FRAMEWORKPATH").isEmpty() ? SettingsAsList : 0, 5) << ";\n"; { ProStringList cflags = project->values("QMAKE_CFLAGS"); @@ -1389,7 +1389,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) const ProStringList &defines = project->values("DEFINES"); for (int i = 0; i < defines.size(); ++i) cflags += "-D" + defines.at(i); - t << "\t\t\t\t" << writeSettings("OTHER_CFLAGS", fixListForOutput(cflags), SettingsAsList, 5) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("OTHER_CFLAGS", fixListForOutput(cflags), SettingsAsList, 5) << ";\n"; } { ProStringList cxxflags = project->values("QMAKE_CXXFLAGS"); @@ -1399,7 +1399,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) const ProStringList &defines = project->values("DEFINES"); for (int i = 0; i < defines.size(); ++i) cxxflags += "-D" + defines.at(i); - t << "\t\t\t\t" << writeSettings("OTHER_CPLUSPLUSFLAGS", fixListForOutput(cxxflags), SettingsAsList, 5) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("OTHER_CPLUSPLUSFLAGS", fixListForOutput(cxxflags), SettingsAsList, 5) << ";\n"; } if (!project->isActiveConfig("staticlib")) { t << "\t\t\t\t" << writeSettings("OTHER_LDFLAGS", @@ -1407,60 +1407,60 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) + fixListForOutput("QMAKE_LFLAGS") + fixListForOutput("QMAKE_LIBS") + fixListForOutput("QMAKE_LIBS_PRIVATE"), - SettingsAsList, 6) << ";" << "\n"; + SettingsAsList, 6) << ";\n"; } const ProStringList &archs = !project->values("QMAKE_XCODE_ARCHS").isEmpty() ? project->values("QMAKE_XCODE_ARCHS") : project->values("QT_ARCH"); if (!archs.isEmpty()) - t << "\t\t\t\t" << writeSettings("ARCHS", archs) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("ARCHS", archs) << ";\n"; if (!project->isEmpty("OBJECTS_DIR")) - t << "\t\t\t\t" << writeSettings("OBJROOT", escapeFilePath(project->first("OBJECTS_DIR").toQString())) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("OBJROOT", escapeFilePath(project->first("OBJECTS_DIR").toQString())) << ";\n"; } else { if (project->first("TEMPLATE") == "app") { - t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";\n"; } else { if (!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) - t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "STATIC") << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "STATIC") << ";\n"; else - t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "DYNAMIC") << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "DYNAMIC") << ";\n"; ProString lib = project->first("QMAKE_ORIG_TARGET"); if (!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib")) lib.prepend("lib"); - t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", escapeFilePath(lib)) << ";" << "\n"; + t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", escapeFilePath(lib)) << ";\n"; } } - t << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("name", name) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t\t};\n" + << "\t\t\t" << writeSettings("name", name) << ";\n" + << "\t\t};\n"; } } for (int i = 0; i < buildConfigGroups.size(); i++) { - t << "\t\t" << keyFor("QMAKE_PBX_BUILDCONFIG_LIST_" + buildConfigGroups.at(i)) << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("buildConfigurations", project->values(ProKey("QMAKE_PBX_BUILDCONFIGS_" + buildConfigGroups.at(i))), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_PBX_BUILDCONFIG_LIST_" + buildConfigGroups.at(i)) << " = {\n" + << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("buildConfigurations", project->values(ProKey("QMAKE_PBX_BUILDCONFIGS_" + buildConfigGroups.at(i))), SettingsAsList, 4) << ";\n" + << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig) << ";\n" + << "\t\t};\n"; } //ROOT - t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {" << "\n" - << "\t\t\t" << writeSettings("hasScannedForEncodings", "1", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("compatibilityVersion", "Xcode 3.2") << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXProject", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_PBX_ROOT_GROUP")) << ";" << "\n" - << "\t\t\t" << writeSettings("productRefGroup", keyFor("Products")) << ";" << "\n"; - t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_PROJECT")) << ";" << "\n"; - t << "\t\t\t" << writeSettings("projectDirPath", ProStringList()) << ";" << "\n" - << "\t\t\t" << writeSettings("projectRoot", "") << ";" << "\n" - << "\t\t\t" << writeSettings("targets", project->values("QMAKE_PBX_TARGETS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t" << "};" << "\n"; + t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {\n" + << "\t\t\t" << writeSettings("hasScannedForEncodings", "1", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("compatibilityVersion", "Xcode 3.2") << ";\n" + << "\t\t\t" << writeSettings("isa", "PBXProject", SettingsNoQuote) << ";\n" + << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_PBX_ROOT_GROUP")) << ";\n" + << "\t\t\t" << writeSettings("productRefGroup", keyFor("Products")) << ";\n"; + t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_PROJECT")) << ";\n"; + t << "\t\t\t" << writeSettings("projectDirPath", ProStringList()) << ";\n" + << "\t\t\t" << writeSettings("projectRoot", "") << ";\n" + << "\t\t\t" << writeSettings("targets", project->values("QMAKE_PBX_TARGETS"), SettingsAsList, 4) << ";\n" + << "\t\t};\n"; // FIXME: Deal with developmentRegion and knownRegions for QMAKE_PBX_ROOT //FOOTER - t << "\t" << "};" << "\n" - << "\t" << writeSettings("rootObject", keyFor("QMAKE_PBX_ROOT")) << ";" << "\n" - << "}" << endl; + t << "\t};\n" + << "\t" << writeSettings("rootObject", keyFor("QMAKE_PBX_ROOT")) << ";\n" + << "}\n"; if(project->isActiveConfig("generate_pbxbuild_makefile")) { QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"), @@ -1473,17 +1473,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) writeHeader(mkwrapt); const char cleans[] = "preprocess_clean "; mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n" - << "all:" << "\n\t" + << "all:\n\t" << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << "\n" - << "install: all" << "\n\t" + << "install: all\n\t" << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " install\n" - << "distclean clean: preprocess_clean" << "\n\t" - << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " clean" << "\n" - << (!did_preprocess ? cleans : "") << ":" << "\n"; + << "distclean clean: preprocess_clean\n\t" + << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " clean\n" + << (!did_preprocess ? cleans : "") << ":\n"; if(did_preprocess) - mkwrapt << cleans << ":" << "\n\t" + mkwrapt << cleans << ":\n\t" << "make -f " - << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl; + << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@\n"; writingUnixMakefileGenerator = false; } } diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 72aa1ffeb9..0264dbf37e 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -317,6 +317,10 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString if(!val.isEmpty()) { QString qval = val.toQString(); QString file = fixEnvVariables(qval); + if (file.isEmpty()) { + ++val_it; + continue; + } if(!(flags & VPATH_NoFixify)) file = fileFixify(file, qmake_getpwd(), Option::output_dir); if (file.at(0) == '\"' && file.at(file.length() - 1) == '\"') @@ -1037,7 +1041,7 @@ MakefileGenerator::writeProjectMakefile() } } if(project->isActiveConfig("build_all")) { - t << "first: all" << endl; + t << "first: all\n"; QList<SubTarget*>::Iterator it; //install @@ -1053,8 +1057,8 @@ MakefileGenerator::writeProjectMakefile() t << endl; } else { t << "first: " << targets.first()->target << endl - << "install: " << targets.first()->target << "-install" << endl - << "uninstall: " << targets.first()->target << "-uninstall" << endl; + << "install: " << targets.first()->target << "-install\n" + << "uninstall: " << targets.first()->target << "-uninstall\n"; } writeSubTargets(t, targets, SubTargetsNoFlags); @@ -1393,7 +1397,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) t << "uninstall_" << (*it) << ": FORCE"; for (int i = uninst.size(); --i >= 0; ) t << "\n\t" << uninst.at(i); - t << "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " " << endl << endl; + t << "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " \n\n"; } t << endl; @@ -1906,7 +1910,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if(tmp_clean.isEmpty()) tmp_clean = tmp_out; if(tmp_clean.indexOf("${QMAKE_") == -1) { - t << "\n\t" << "-$(DEL_FILE) " << tmp_clean; + t << "\n\t-$(DEL_FILE) " << tmp_clean; wrote_clean = true; } if(!wrote_clean_cmds || !wrote_clean) { @@ -2142,7 +2146,7 @@ MakefileGenerator::writeExtraCompilerVariables(QTextStream &t) const ProStringList &vars = project->values(ProKey(*it + ".variables")); for (ProStringList::ConstIterator varit = vars.begin(); varit != vars.end(); ++varit) { if(first) { - t << "\n####### Custom Compiler Variables" << endl; + t << "\n####### Custom Compiler Variables\n"; first = false; } t << "QMAKE_COMP_" << (*varit) << " = " @@ -2169,7 +2173,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) } } if (!outlist.isEmpty()) { - t << "####### Custom Variables" << endl; + t << "####### Custom Variables\n"; t << outlist.join("\n") << endl << endl; } } @@ -2182,24 +2186,24 @@ MakefileGenerator::writeStubMakefile(QTextStream &t) for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; //const QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); - t << "first all clean install distclean uninstall: " << "qmake" << endl - << "qmake_all:" << endl; + t << "first all clean install distclean uninstall: qmake\n" + << "qmake_all:\n"; writeMakeQmake(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } bool MakefileGenerator::writeMakefile(QTextStream &t) { - t << "####### Compile" << endl << endl; + t << "####### Compile\n\n"; writeObj(t, "SOURCES"); writeObj(t, "GENERATED_SOURCES"); - t << "####### Install" << endl << endl; + t << "####### Install\n\n"; writeInstalls(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } @@ -2242,14 +2246,14 @@ QString MakefileGenerator::build_args(const QString &outdir) void MakefileGenerator::writeHeader(QTextStream &t) { - t << "#############################################################################" << endl; + t << "#############################################################################\n"; t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl; - t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")" << endl; + t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")\n"; t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl; - t << "#############################################################################" << endl; + t << "#############################################################################\n"; t << endl; QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); if (ofile.lastIndexOf(Option::dir_sep) != -1) @@ -2374,7 +2378,7 @@ void MakefileGenerator::writeSubDirs(QTextStream &t) { QList<SubTarget*> targets = findSubDirsSubTargets(); - t << "first: make_first" << endl; + t << "first: make_first\n"; int flags = SubTargetInstalls; if(project->isActiveConfig("ordered")) flags |= SubTargetOrdered; @@ -2534,10 +2538,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT if(!targets.isEmpty()) { for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it) { if(!(*it)->profile.isEmpty()) - t << " " << (*it)->target << "-" << "qmake_all"; + t << " " << (*it)->target << "-qmake_all"; } } - t << " FORCE" << endl << endl; + t << " FORCE\n\n"; } for(int s = 0; s < targetSuffixes.size(); ++s) { @@ -2566,7 +2570,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << varGlue("ALL_DEPS"," "," ",""); if(suffix == "clean") t << varGlue("CLEAN_DEPS"," "," ",""); - t << " FORCE" << endl; + t << " FORCE\n"; if(suffix == "clean") { t << fileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n"); } else if(suffix == "distclean") { @@ -2667,7 +2671,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT project->values("UNINSTALLDEPS") += "uninstall_subtargets"; writeInstalls(t, true); } - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; } void @@ -2676,7 +2680,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { QStringList files = fileFixify(Option::mkfile::project_files); - t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": " << "\n\t" + t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t" << "@$(QMAKE) -prl " << buildArgs() << " " << files.join(' ') << endl; } @@ -2700,13 +2704,13 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) for(int include = 0; include < included.size(); ++include) { const ProString &i = included.at(include); if(!i.isEmpty()) - t << i << ":" << endl; + t << i << ":\n"; } } if(project->first("QMAKE_ORIG_TARGET") != "qmake") { t << "qmake: FORCE\n\t@" << qmake << endl << endl; if (!noDummyQmakeAll) - t << "qmake_all: FORCE" << endl << endl; + t << "qmake_all: FORCE\n\n"; } } @@ -3249,7 +3253,7 @@ MakefileGenerator::writePkgConfigFile() if (project->isActiveConfig("shared")) pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString(); } - t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl; + t << pkgConfiglibDir << " " << pkgConfiglibName << " \n"; ProStringList libs; if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) { @@ -3273,7 +3277,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("PRL_EXPORT_CXXFLAGS", "", " ", " ") << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") - << "-I${includedir}" << endl; + << "-I${includedir}\n"; // requires const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' '); diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 9adcc3af7c..948fd2b79c 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -154,7 +154,7 @@ UnixMakefileGenerator::init() } } ldadd += project->values("QMAKE_LIBDIR_FLAGS"); - if (project->isActiveConfig("macx")) { + if (project->isActiveConfig("mac")) { if (!project->isEmpty("QMAKE_FRAMEWORKPATH")) { const ProStringList &fwdirs = project->values("QMAKE_FRAMEWORKPATH"); for (int i = 0; i < fwdirs.size(); ++i) @@ -262,7 +262,7 @@ UnixMakefileGenerator::init() project->values(runCompImp).append("$(" + compiler + ") " + compile_flag + " " + var("QMAKE_CC_O_FLAG") + "\"$@\" \"$<\""); } - if(project->isActiveConfig("macx") && !project->isEmpty("TARGET") && !project->isActiveConfig("compile_libtool") && + if (project->isActiveConfig("mac") && !project->isEmpty("TARGET") && !project->isActiveConfig("compile_libtool") && ((project->isActiveConfig("build_pass") || project->isEmpty("BUILDS")))) { ProString bundle; if(project->isActiveConfig("bundle") && !project->isEmpty("QMAKE_BUNDLE_EXTENSION")) { diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 2a99b5dd34..c81b7d8d12 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -85,12 +85,12 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t) const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; - t << "first all clean install distclean uninstall qmake_all:" << "\n\t" + t << "first all clean install distclean uninstall qmake_all:\n\t" << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" - << "@echo \"Skipped.\"" << endl << endl; + << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" + << "@echo \"Skipped.\"\n\n"; writeMakeQmake(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } @@ -118,15 +118,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) (!project->isActiveConfig("staticlib")))), src_incremental=false; - t << "####### Compiler, tools and options" << endl << endl; + t << "####### Compiler, tools and options\n\n"; t << "CC = " << var("QMAKE_CC") << endl; t << "CXX = " << var("QMAKE_CXX") << endl; t << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") << varGlue("DEFINES","-D"," -D","") << endl; - t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)" << endl; - t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)" << endl; - t << "INCPATH = " << "-I" << specdir(); + t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n"; + t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n"; + t << "INCPATH = -I" << specdir(); if(!project->isActiveConfig("no_include_pwd")) { QString pwd = escapeFilePath(fileFixify(qmake_getpwd())); if(pwd.isEmpty()) @@ -138,7 +138,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) for(int i = 0; i < incs.size(); ++i) { ProString inc = escapeFilePath(incs.at(i)); if(!inc.isEmpty()) - t << " " << "-I" << inc; + t << " -I" << inc; } } if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS")) @@ -148,7 +148,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isActiveConfig("staticlib")) { t << "LINK = " << var("QMAKE_LINK") << endl; t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; - t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl; + t << "LIBS = $(SUBLIBS) " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl; } t << "AR = " << var("QMAKE_AR") << endl; @@ -176,15 +176,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << endl; - t << "####### Output directory" << endl << endl; + t << "####### Output directory\n\n"; if (! project->values("OBJECTS_DIR").isEmpty()) t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl; else - t << "OBJECTS_DIR = ./" << endl; + t << "OBJECTS_DIR = ./\n"; t << endl; /* files */ - t << "####### Files" << endl << endl; + t << "####### Files\n\n"; t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES"))) << " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl; if(do_incremental) { @@ -225,7 +225,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) // would be interpreted as line continuation. The lack of spacing between the value and the // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this // spacing. - t << "DESTDIR = " << var("DESTDIR") << "#avoid trailing-slash linebreak" << endl; + t << "DESTDIR = " << var("DESTDIR") << "#avoid trailing-slash linebreak\n"; if(project->isActiveConfig("compile_libtool")) t << "TARGETL = " << var("TARGET_la") << endl; t << "TARGET = " << escapeFilePath(var("TARGET")) << endl; @@ -257,8 +257,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "include " << (*it) << endl; /* rules */ - t << "first: all" << endl; - t << "####### Implicit rules" << endl << endl; + t << "first: all\n"; + t << "####### Implicit rules\n\n"; t << ".SUFFIXES: " << Option::obj_ext; for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit) t << " " << (*cit); @@ -290,18 +290,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString pwd = escapeFilePath(fileFixify(qmake_getpwd())); - t << "###### Dependencies" << endl << endl; + t << "###### Dependencies\n\n"; t << odir << ".deps/%.d: " << pwd << "/%.cpp\n\t"; if(project->isActiveConfig("echo_depend_creation")) - t << "@echo Creating depend for $<" << "\n\t"; + t << "@echo Creating depend for $<\n\t"; t << mkdir_p_asstring("$(@D)") << "\n\t" - << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl; + << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@\n\n"; t << odir << ".deps/%.d: " << pwd << "/%.c\n\t"; if(project->isActiveConfig("echo_depend_creation")) - t << "@echo Creating depend for $<" << "\n\t"; + t << "@echo Creating depend for $<\n\t"; t << mkdir_p_asstring("$(@D)") << "\n\t" - << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl; + << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@\n\n"; static const char * const src[] = { "SOURCES", "GENERATED_SOURCES", 0 }; for (int x = 0; src[x]; x++) { @@ -341,7 +341,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } - t << "####### Build rules" << endl << endl; + t << "####### Build rules\n\n"; if(!project->values("SUBLIBS").isEmpty()) { ProString libdir = "tmp/"; if(!project->isEmpty("SUBLIBS_DIR")) @@ -371,9 +371,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << ":\n\t@echo \"Creating '"; else t << ": FORCE\n\t@echo \"Creating/updating '"; - t << targ << "'\"" << "\n\t" + t << targ << "'\"\n\t" << "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";" - << "$(MAKE))" << endl; + << "$(MAKE))\n"; } } } @@ -397,8 +397,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") { QString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext; //actual target - t << incr_target_dir << ": $(OBJECTS)" << "\n\t" - << "ld -r -o "<< incr_target_dir << " $(OBJECTS)" << endl; + t << incr_target_dir << ": $(OBJECTS)\n\t" + << "ld -r -o "<< incr_target_dir << " $(OBJECTS)\n"; //communicated below deps.prepend(incr_target_dir + " "); incr_deps = "$(INCREMENTAL_OBJECTS)"; @@ -414,11 +414,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) incr_lflags += var("QMAKE_LFLAGS_DEBUG"); else incr_lflags += var("QMAKE_LFLAGS_RELEASE"); - t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t"; + t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t"; if(!destdir.isEmpty()) t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t"; t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir << - " $(INCREMENTAL_OBJECTS)" << endl; + " $(INCREMENTAL_OBJECTS)\n"; //communicated below if(!destdir.isEmpty()) { if(!incr_objs.isEmpty()) @@ -509,11 +509,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) incr_lflags += var("QMAKE_LFLAGS_DEBUG"); else incr_lflags += var("QMAKE_LFLAGS_RELEASE"); - t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t"; + t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; t << "$(LINK) " << incr_lflags << " " << var("QMAKE_LINK_O_FLAG") << incr_target_dir << - " $(INCREMENTAL_OBJECTS)" << endl; + " $(INCREMENTAL_OBJECTS)\n"; //communicated below ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD"); if(!destdir.isEmpty()) @@ -523,15 +523,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) incr_deps = "$(OBJECTS)"; } - t << "all: " << " " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") - << " " << destdir << "$(TARGET)" << endl << endl; + t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") + << " " << destdir << "$(TARGET)\n\n"; //real target t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " " << incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS"); } else { t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << " " << - destdir << "$(TARGET)" << endl << endl; + destdir << "$(TARGET)\n\n"; t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps << " " << var("POST_TARGETDEPS"); @@ -546,7 +546,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << var("QMAKE_LINK_SHLIB_CMD"); } else if(project->isActiveConfig("plugin")) { t << "\n\t" - << "-$(DEL_FILE) $(TARGET)" << "\n\t" + << "-$(DEL_FILE) $(TARGET)\n\t" << var("QMAKE_LINK_SHLIB_CMD"); if(!destdir.isEmpty()) t << "\n\t" @@ -556,15 +556,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << endl << endl; } else if(!project->isEmpty("QMAKE_BUNDLE")) { t << "\n\t" - << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(DESTDIR)$(TARGET0)" << "\n\t" + << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(DESTDIR)$(TARGET0)\n\t" << var("QMAKE_LINK_SHLIB_CMD") << "\n\t" << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGETD)`\"", false) << "\n\t" - << "-$(MOVE) $(TARGET) $(DESTDIR)$(TARGETD)" << "\n\t" + << "-$(MOVE) $(TARGET) $(DESTDIR)$(TARGETD)\n\t" << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t" << varGlue("QMAKE_LN_SHLIB","-"," "," Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t" - << "-$(DEL_FILE) " << destdir << "Versions/Current" << "\n\t" + << "-$(DEL_FILE) " << destdir << "Versions/Current\n\t" << varGlue("QMAKE_LN_SHLIB","-"," ", " " + project->first("QMAKE_FRAMEWORK_VERSION") + " " + destdir + "Versions/Current") << "\n\t"; if(!project->isEmpty("QMAKE_POST_LINK")) @@ -572,7 +572,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << endl << endl; } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) { t << "\n\t" - << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t" + << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)\n\t" << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t" << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t" @@ -592,7 +592,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << endl << endl; } else { t << "\n\t" - << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t" + << "-$(DEL_FILE) $(TARGET) $(TARGET0)\n\t" << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)"); if(!destdir.isEmpty()) @@ -608,38 +608,38 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << endl << endl; if (! project->isActiveConfig("plugin")) { - t << "staticlib: $(TARGETA)" << endl << endl; + t << "staticlib: $(TARGETA)\n\n"; t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)"; if(do_incremental) t << " $(INCREMENTAL_OBJECTS)"; t << " " << var("POST_TARGETDEPS") << "\n\t" - << "-$(DEL_FILE) $(TARGETA) " << "\n\t" + << "-$(DEL_FILE) $(TARGETA) \n\t" << var("QMAKE_AR_CMD"); if(do_incremental) t << " $(INCREMENTAL_OBJECTS)"; if(!project->isEmpty("QMAKE_RANLIB")) - t << "\n\t" << "$(RANLIB) $(TARGETA)"; + t << "\n\t$(RANLIB) $(TARGETA)"; t << endl << endl; } } else { QString destdir = project->first("DESTDIR").toQString(); t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << destdir << "$(TARGET) " << varGlue("QMAKE_AR_SUBLIBS", destdir, " " + destdir, "") << "\n\n" - << "staticlib: " << destdir << "$(TARGET)" << "\n\n"; + << "staticlib: " << destdir << "$(TARGET)\n\n"; if(project->isEmpty("QMAKE_AR_SUBLIBS")) { t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; - t << "-$(DEL_FILE) $(TARGET)" << "\n\t" + t << "-$(DEL_FILE) $(TARGET)\n\t" << var("QMAKE_AR_CMD") << "\n"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\t" << var("QMAKE_POST_LINK") << "\n"; if(!project->isEmpty("QMAKE_RANLIB")) - t << "\t" << "$(RANLIB) $(TARGET)" << "\n"; + t << "\t$(RANLIB) $(TARGET)\n"; if(!destdir.isEmpty()) - t << "\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)" << "\n" - << "\t" << "-$(MOVE) $(TARGET) " << destdir << " \n"; + t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)\n" + << "\t-$(MOVE) $(TARGET) " << destdir << " \n"; } else { int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(); ProStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"), @@ -667,10 +667,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_POST_LINK")) t << "\t" << var("QMAKE_POST_LINK") << "\n"; if(!project->isEmpty("QMAKE_RANLIB")) - t << "\t" << "$(RANLIB) " << (*libit) << "\n"; + t << "\t$(RANLIB) " << (*libit) << "\n"; if(!destdir.isEmpty()) - t << "\t" << "-$(DEL_FILE) " << destdir << (*libit) << "\n" - << "\t" << "-$(MOVE) " << (*libit) << " " << destdir << " \n"; + t << "\t-$(DEL_FILE) " << destdir << (*libit) << "\n" + << "\t-$(MOVE) " << (*libit) << " " << destdir << " \n"; } } t << endl << endl; @@ -687,14 +687,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) meta_files += pkgConfigFileName(); } if(!meta_files.isEmpty()) - t << escapeDependencyPaths(meta_files).join(" ") << ": " << "\n\t" + t << escapeDependencyPaths(meta_files).join(" ") << ": \n\t" << "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl; } if(!project->first("QMAKE_PKGINFO").isEmpty()) { ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents"); - t << pkginfo << ": " << "\n\t"; + t << pkginfo << ": \n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; t << "@$(DEL_FILE) " << pkginfo << "\n\t" @@ -705,16 +705,16 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources"); - t << resources << ": " << "\n\t"; + t << resources << ": \n\t"; t << mkdir_p_asstring(destdir) << "\n\t"; - t << "@touch " << resources << "\n\t" << endl; + t << "@touch " << resources << "\n\t\n"; } if(!project->isEmpty("QMAKE_BUNDLE")) { //copy the plist QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())), info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString()); QString destdir = info_plist_out.section(Option::dir_sep, 0, -2); - t << info_plist_out << ": " << "\n\t"; + t << info_plist_out << ": \n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; ProStringList commonSedArgs; @@ -765,7 +765,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->isEmpty(vkey)) { QString version = project->first(vkey) + "/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/"; - t << Option::fixPathToLocalOS(path + project->first(pkey)) << ": " << "\n\t" + t << Option::fixPathToLocalOS(path + project->first(pkey)) << ": \n\t" << mkdir_p_asstring(path) << "\n\t" << "@$(SYMLINK) " << version << project->first(pkey) << " " << path << endl; path += version; @@ -805,7 +805,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString ddir_c = escapeFilePath(fileFixify((project->isEmpty("OBJECTS_DIR") ? ProString(".tmp/") : project->first("OBJECTS_DIR")) + ddir, Option::output_dir, Option::output_dir)); - t << "dist: " << "\n\t" + t << "dist: \n\t" << mkdir_p_asstring(ddir_c) << "\n\t" << "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && "; if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) { @@ -833,18 +833,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString clean_targets = "compiler_clean " + var("CLEAN_DEPS"); if(do_incremental) { - t << "incrclean:" << "\n"; + t << "incrclean:\n"; if(src_incremental) - t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n"; + t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n"; t << endl; } t << "clean:" << clean_targets << "\n\t"; if(!project->isEmpty("OBJECTS")) { if(project->isActiveConfig("compile_libtool")) - t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)" << "\n\t"; + t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)\n\t"; else - t << "-$(DEL_FILE) $(OBJECTS)" << "\n\t"; + t << "-$(DEL_FILE) $(OBJECTS)\n\t"; } if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) { ProStringList precomp_files; @@ -891,11 +891,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("IMAGES")) t << varGlue("QMAKE_IMAGE_COLLECTION", "\t-$(DEL_FILE) ", " ", "") << "\n\t"; if(src_incremental) - t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n\t"; + t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n\t"; t << varGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t") - << "-$(DEL_FILE) *~ core *.core" << "\n" + << "-$(DEL_FILE) *~ core *.core\n" << varGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl; - t << "####### Sub-libraries" << endl << endl; + t << "####### Sub-libraries\n\n"; if (!project->values("SUBLIBS").isEmpty()) { ProString libdir = "tmp/"; if(!project->isEmpty("SUBLIBS_DIR")) @@ -910,19 +910,19 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ProString destdir = project->first("DESTDIR"); if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep)) destdir += Option::dir_sep; - t << "distclean: " << "clean\n"; + t << "distclean: clean\n"; if(!project->isEmpty("QMAKE_BUNDLE")) { QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE")); t << "\t-$(DEL_FILE) -r " << bundlePath << endl; } else if(project->isActiveConfig("compile_libtool")) { - t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) " << "$(TARGET)" << endl; + t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) $(TARGET)\n"; } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() && !project->isActiveConfig("plugin")) { - t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << endl; + t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n"; t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " - << destdir << "$(TARGET2) $(TARGETA)" << endl; + << destdir << "$(TARGET2) $(TARGETA)\n"; } else { - t << "\t-$(DEL_FILE) " << "$(TARGET)" << " " << endl; + t << "\t-$(DEL_FILE) $(TARGET) \n"; } t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n"); { @@ -934,7 +934,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) { QString pchInput = project->first("PRECOMPILED_HEADER").toQString(); - t << "###### Prefix headers" << endl; + t << "###### Prefix headers\n"; QString comps[] = { "C", "CXX", "OBJC", "OBJCXX", QString() }; for(int i = 0; !comps[i].isNull(); i++) { QString pchFlags = var(ProKey("QMAKE_" + comps[i] + "FLAGS_PRECOMPILE")); diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index be4f203f01..38e6c56bb5 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -115,10 +115,10 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) { writeHeader(t); if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - t << "all clean:" << "\n\t" + t << "all clean:\n\t" << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" - << "@echo \"Skipped.\"" << endl << endl; + << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" + << "@echo \"Skipped.\"\n\n"; writeMakeQmake(t); return true; } @@ -134,10 +134,10 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; - t << "first all clean install distclean uninstall: qmake" << endl - << "qmake_all:" << endl; + t << "first all clean install distclean uninstall: qmake\n" + << "qmake_all:\n"; writeMakeQmake(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } writeMingwParts(t); @@ -156,7 +156,7 @@ void createLdObjectScriptFile(const QString &fileName, const ProStringList &objL QFile file(filePath); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream t(&file); - t << "INPUT(" << endl; + t << "INPUT(\n"; for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) { QString path = (*it).toQString(); if (QDir::isRelativePath(path)) @@ -164,7 +164,7 @@ void createLdObjectScriptFile(const QString &fileName, const ProStringList &objL else t << path << endl; } - t << ");" << endl; + t << ");\n"; t.flush(); file.close(); } @@ -180,7 +180,7 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) { t << "ADDMOD " << *it << endl; } - t << "SAVE" << endl; + t << "SAVE\n"; t.flush(); file.close(); } @@ -214,13 +214,13 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t) t << escapeDependencyPath(cHeader) << ": " << escapeDependencyPath(header) << " " << escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t") << "\n\t" << mkdir_p_asstring(preCompHeaderOut) - << "\n\t" << "$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << cHeader << " " << header + << "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << cHeader << " " << header << endl << endl; QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++"; t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " " << escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t") << "\n\t" << mkdir_p_asstring(preCompHeaderOut) - << "\n\t" << "$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << cppHeader << " " << header + << "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << cppHeader << " " << header << endl << endl; } } @@ -393,19 +393,19 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t) void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) { - t << "first: all" << endl; - t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << " $(DESTDIR_TARGET)" << endl << endl; + t << "first: all\n"; + t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << " $(DESTDIR_TARGET)\n\n"; t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS"); if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <<var("QMAKE_PRE_LINK"); if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") { if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) { - t << "\n\t" << "$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ; + t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ; } else { t << "\n\t" << objectsLinkLine << " " ; } } else if (project->first("TEMPLATE") != "aux") { - t << "\n\t" << "$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)"; + t << "\n\t$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " $(LIBS)"; } if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" <<var("QMAKE_POST_LINK"); @@ -432,7 +432,7 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t) if (!rc_file.isEmpty()) { t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t" << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE") - << incPathStr << " $(DEFINES)" << endl << endl; + << incPathStr << " $(DEFINES)\n\n"; } } diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 49b601e7e5..b20f3c5ec4 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -2053,6 +2053,8 @@ QString VCXProjectWriter::platformToolSetVersion(const DotNET version) { case NET2012: return "v110"; + case NET2013: + return "v120"; } return QString(); } diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index e2c9fdbf37..8af80e572e 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -62,10 +62,10 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; - t << "all first clean:" << "\n\t" + t << "all first clean:\n\t" << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" - << "@echo \"Skipped.\"" << endl << endl; + << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" + << "@echo \"Skipped.\"\n\n"; writeMakeQmake(t); return true; } @@ -193,7 +193,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t) if(usePCH) { QString precompRule = QString("-c -Yc -Fp%1 -Fo%2").arg(precompPch).arg(precompObj); t << precompObj << ": " << precompH << " " << escapeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t") - << "\n\t" << "$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " << precompH << endl << endl; + << "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " << precompH << endl << endl; } } @@ -359,10 +359,10 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t) objDir = ""; for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) t << "{" << it.key() << "}" << (*cppit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t" - << var("QMAKE_RUN_CXX_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<" << endl << "<<" << endl << endl; + << var("QMAKE_RUN_CXX_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n"; for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit) t << "{" << it.key() << "}" << (*cit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t" - << var("QMAKE_RUN_CC_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<" << endl << "<<" << endl << endl; + << var("QMAKE_RUN_CC_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n"; } } else { for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) @@ -377,14 +377,14 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) { const ProString templateName = project->first("TEMPLATE"); - t << "first: all" << endl; - t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(DESTDIR_TARGET)" << endl << endl; + t << "first: all\n"; + t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(DESTDIR_TARGET)\n\n"; t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS"); if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <<var("QMAKE_PRE_LINK"); if(project->isActiveConfig("staticlib")) { - t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<" << "\n\t " + t << "\n\t$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n\t " << "$(OBJECTS)" << "\n<<"; } else if (templateName != "aux") { @@ -433,7 +433,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) writeLinkCommand(t, extraLFlags, manifest_res); t << "\n\tif exist " << manifest_bak << " del " << manifest_bak; } else { - t << "\n\t" << "rc.exe /fo" << manifest_res << " " << manifest_rc; + t << "\n\trc.exe /fo" << manifest_res << " " << manifest_rc; t << "\n\t"; writeLinkCommand(t, extraLFlags, manifest_res); } @@ -441,7 +441,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) // directly embed the manifest in the executable after linking t << "\n\t"; writeLinkCommand(t, extraLFlags); - t << "\n\t" << "mt.exe /nologo /manifest " << manifest + t << "\n\tmt.exe /nologo /manifest " << manifest << " /outputresource:$(DESTDIR_TARGET);" << resourceId; } } else { diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 4dbba6d974..8c25ab6f9b 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -235,6 +235,7 @@ const char _WarningLevel[] = "WarningLevel"; const char _WholeProgramOptimization[] = "WholeProgramOptimization"; const char _CompileForArchitecture[] = "CompileForArchitecture"; const char _InterworkCalls[] = "InterworkCalls"; +const char _GenerateManifest[] = "GenerateManifest"; // XmlOutput stream functions ------------------------------ inline XmlOutput::xml_output attrT(const char *name, const triState v) @@ -2649,6 +2650,7 @@ void VCProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool) << attrS(_TypeLibraryFile, tool.TypeLibraryFile) << attrL(_TypeLibraryResourceID, tool.TypeLibraryResourceID, /*ifNot*/ rcUseDefault) << attrS(_Version, tool.Version) + << attrT(_GenerateManifest, tool.GenerateManifest) << closetag(_Tool); } diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index e60fb1dfca..034825ed44 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -63,7 +63,8 @@ enum DotNET { NET2005 = 0x80, NET2008 = 0x90, NET2010 = 0xa0, - NET2012 = 0xb0 + NET2012 = 0xb0, + NET2013 = 0xc0 }; /* diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 20ff9073f9..dfcb0ec352 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -77,6 +77,8 @@ struct DotNetCombo { const char *regKey; } dotNetCombo[] = { #ifdef Q_OS_WIN64 + {NET2013, "MSVC.NET 2013 (12.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"}, + {NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"}, {NET2012, "MSVC.NET 2012 (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"}, {NET2012, "MSVC.NET 2012 Express Edition (11.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir"}, {NET2010, "MSVC.NET 2010 (10.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"}, @@ -88,6 +90,8 @@ struct DotNetCombo { {NET2003, "MSVC.NET 2003 (7.1)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir"}, {NET2002, "MSVC.NET 2002 (7.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"}, #else + {NET2013, "MSVC.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"}, + {NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"}, {NET2012, "MSVC.NET 2012 (11.0)", "Software\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"}, {NET2012, "MSVC.NET 2012 Express Edition (11.0)", "Software\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir"}, {NET2010, "MSVC.NET 2010 (10.0)", "Software\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"}, @@ -183,6 +187,8 @@ const char _slnHeader100[] = "Microsoft Visual Studio Solution File, Format "\n# Visual Studio 2010"; const char _slnHeader110[] = "Microsoft Visual Studio Solution File, Format Version 12.00" "\n# Visual Studio 2012"; +const char _slnHeader120[] = "Microsoft Visual Studio Solution File, Format Version 12.00" + "\n# Visual Studio 2013"; // The following UUID _may_ change for later servicepacks... // If so we need to search through the registry at // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects @@ -592,6 +598,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) } switch(which_dotnet_version()) { + case NET2013: + t << _slnHeader120; + break; case NET2012: t << _slnHeader110; break; @@ -868,6 +877,9 @@ void VcprojGenerator::initProject() // Own elements ----------------------------- vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET").toQString()); switch(which_dotnet_version()) { + case NET2013: + vcProject.Version = "13.00"; + break; case NET2012: vcProject.Version = "12.00"; break; @@ -1322,7 +1334,8 @@ void VcprojGenerator::initGeneratedFiles() vcProject.GeneratedFiles.addFiles(project->values("GENERATED_SOURCES")); vcProject.GeneratedFiles.addFiles(project->values("GENERATED_FILES")); vcProject.GeneratedFiles.addFiles(project->values("IDLSOURCES")); - vcProject.GeneratedFiles.addFiles(project->values("RES_FILE")); + if (project->values("RC_FILE").isEmpty()) + vcProject.GeneratedFiles.addFiles(project->values("RES_FILE")); vcProject.GeneratedFiles.addFiles(project->values("QMAKE_IMAGE_COLLECTION")); // compat if(!extraCompilerOutputs.isEmpty()) vcProject.GeneratedFiles.addFiles(extraCompilerOutputs.keys()); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 08674a323c..fe85efc8ba 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -423,56 +423,56 @@ void Win32MakefileGenerator::processRcFileVar() int rcLang = project->intValue("RC_LANG", 1033); // default: English(USA) int rcCodePage = project->intValue("RC_CODEPAGE", 1200); // default: Unicode - ts << "# if defined(UNDER_CE)" << endl; - ts << "# include <winbase.h>" << endl; - ts << "# else" << endl; - ts << "# include <winver.h>" << endl; - ts << "# endif" << endl; + ts << "# if defined(UNDER_CE)\n"; + ts << "# include <winbase.h>\n"; + ts << "# else\n"; + ts << "# include <winver.h>\n"; + ts << "# endif\n"; ts << endl; if (!rcIcons.isEmpty()) { for (int i = 0; i < rcIcons.size(); ++i) ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << endl; ts << endl; } - ts << "VS_VERSION_INFO VERSIONINFO" << endl; + ts << "VS_VERSION_INFO VERSIONINFO\n"; ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << endl; ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << endl; - ts << "\tFILEFLAGSMASK 0x3fL" << endl; - ts << "#ifdef _DEBUG" << endl; - ts << "\tFILEFLAGS VS_FF_DEBUG" << endl; - ts << "#else" << endl; - ts << "\tFILEFLAGS 0x0L" << endl; - ts << "#endif" << endl; - ts << "\tFILEOS VOS__WINDOWS32" << endl; + ts << "\tFILEFLAGSMASK 0x3fL\n"; + ts << "#ifdef _DEBUG\n"; + ts << "\tFILEFLAGS VS_FF_DEBUG\n"; + ts << "#else\n"; + ts << "\tFILEFLAGS 0x0L\n"; + ts << "#endif\n"; + ts << "\tFILEOS VOS__WINDOWS32\n"; if (project->isActiveConfig("shared")) - ts << "\tFILETYPE VFT_DLL" << endl; + ts << "\tFILETYPE VFT_DLL\n"; else - ts << "\tFILETYPE VFT_APP" << endl; - ts << "\tFILESUBTYPE 0x0L" << endl; - ts << "\tBEGIN" << endl; - ts << "\t\tBLOCK \"StringFileInfo\"" << endl; - ts << "\t\tBEGIN" << endl; + ts << "\tFILETYPE VFT_APP\n"; + ts << "\tFILESUBTYPE 0x0L\n"; + ts << "\tBEGIN\n"; + ts << "\t\tBLOCK \"StringFileInfo\"\n"; + ts << "\t\tBEGIN\n"; ts << "\t\t\tBLOCK \"" << QString("%1%2").arg(rcLang, 4, 16, QLatin1Char('0')).arg(rcCodePage, 4, 16, QLatin1Char('0')) - << "\"" << endl; - ts << "\t\t\tBEGIN" << endl; - ts << "\t\t\t\tVALUE \"CompanyName\", \"" << companyName << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"FileDescription\", \"" << description << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"FileVersion\", \"" << versionString << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"LegalCopyright\", \"" << copyright << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"OriginalFilename\", \"" << originalName << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"ProductName\", \"" << productName << "\\0\"" << endl; - ts << "\t\t\t\tVALUE \"ProductVersion\", \"" << versionString << "\\0\"" << endl; - ts << "\t\t\tEND" << endl; - ts << "\t\tEND" << endl; - ts << "\t\tBLOCK \"VarFileInfo\"" << endl; - ts << "\t\tBEGIN" << endl; + << "\"\n"; + ts << "\t\t\tBEGIN\n"; + ts << "\t\t\t\tVALUE \"CompanyName\", \"" << companyName << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"FileDescription\", \"" << description << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"FileVersion\", \"" << versionString << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"LegalCopyright\", \"" << copyright << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"OriginalFilename\", \"" << originalName << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"ProductName\", \"" << productName << "\\0\"\n"; + ts << "\t\t\t\tVALUE \"ProductVersion\", \"" << versionString << "\\0\"\n"; + ts << "\t\t\tEND\n"; + ts << "\t\tEND\n"; + ts << "\t\tBLOCK \"VarFileInfo\"\n"; + ts << "\t\tBEGIN\n"; ts << "\t\t\tVALUE \"Translation\", " << QString("0x%1").arg(rcLang, 4, 16, QLatin1Char('0')) << ", " << QString("%1").arg(rcCodePage, 4) << endl; - ts << "\t\tEND" << endl; - ts << "\tEND" << endl; - ts << "/* End of Version info */" << endl; + ts << "\t\tEND\n"; + ts << "\tEND\n"; + ts << "/* End of Version info */\n"; ts << endl; ts.flush(); @@ -598,7 +598,7 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t) } } } - t << "\n\t-$(DEL_FILE) $(DESTDIR_TARGET)" << endl; + t << "\n\t-$(DEL_FILE) $(DESTDIR_TARGET)\n"; { QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); if(!ofile.isEmpty()) @@ -617,7 +617,7 @@ void Win32MakefileGenerator::writeIncPart(QTextStream &t) inc.replace(QRegExp("\\\\$"), ""); inc.replace(QRegExp("\""), ""); if(!inc.isEmpty()) - t << "-I" << "\"" << inc << "\" "; + t << "-I\"" << inc << "\" "; } t << "-I\"" << specdir() << "\"" << endl; @@ -625,14 +625,14 @@ void Win32MakefileGenerator::writeIncPart(QTextStream &t) void Win32MakefileGenerator::writeStandardParts(QTextStream &t) { - t << "####### Compiler, tools and options" << endl << endl; + t << "####### Compiler, tools and options\n\n"; t << "CC = " << var("QMAKE_CC") << endl; t << "CXX = " << var("QMAKE_CXX") << endl; t << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") << varGlue("DEFINES","-D"," -D","") << endl; - t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)" << endl; - t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)" << endl; + t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n"; + t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n"; writeIncPart(t); writeLibsPart(t); @@ -659,14 +659,14 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; t << endl; - t << "####### Output directory" << endl << endl; + t << "####### Output directory\n\n"; if(!project->values("OBJECTS_DIR").isEmpty()) t << "OBJECTS_DIR = " << var("OBJECTS_DIR").replace(QRegExp("\\\\$"),"") << endl; else - t << "OBJECTS_DIR = . " << endl; + t << "OBJECTS_DIR = . \n"; t << endl; - t << "####### Files" << endl << endl; + t << "####### Files\n\n"; t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES"))) << " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl; @@ -688,21 +688,21 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; // The comment is important to maintain variable compatibility with Unix // Makefiles, while not interpreting a trailing-slash as a linebreak - t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl; + t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak\n"; t << "TARGET = " << escapeFilePath(target) << endl; t << "DESTDIR_TARGET = " << escapeFilePath(var("DEST_TARGET")) << endl; t << endl; - t << "####### Implicit rules" << endl << endl; + t << "####### Implicit rules\n\n"; writeImplicitRulesPart(t); - t << "####### Build rules" << endl << endl; + t << "####### Build rules\n\n"; writeBuildRulesPart(t); if(project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) { const ProStringList &dlldirs = project->values("DLLDESTDIR"); for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { - t << "\t" << "-$(COPY_FILE) \"$(DESTDIR_TARGET)\" " + t << "\t-$(COPY_FILE) \"$(DESTDIR_TARGET)\" " << Option::fixPathToTargetOS((*dlldir).toQString(), false) << endl; } } @@ -725,8 +725,8 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) dist_files << ui_h; } } - t << "dist:" << "\n\t" - << "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip " << "$(SOURCES) $(DIST) " + t << "dist:\n\t" + << "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip $(SOURCES) $(DIST) " << dist_files.join(' ') << " " << var("TRANSLATIONS") << " "; if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) { const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS"); diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index c8a97dd893..3efebda8c2 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -276,6 +276,8 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil ushort unicode = vals_data[x].unicode(); if (unicode == quote) { quote = 0; + hadWord = true; + build += QChar(unicode); continue; } switch (unicode) { @@ -283,7 +285,7 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil case '\'': quote = unicode; hadWord = true; - continue; + break; case ' ': case '\t': if (!quote) { @@ -294,22 +296,23 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil } continue; } - build += QChar(unicode); break; case '\\': if (x + 1 != vals_len) { ushort next = vals_data[++x].unicode(); - if (next == '\'' || next == '"' || next == '\\') + if (next == '\'' || next == '"' || next == '\\') { + build += QChar(unicode); unicode = next; - else + } else { --x; + } } // fallthrough default: hadWord = true; - build += QChar(unicode); break; } + build += QChar(unicode); } if (hadWord) ret << ProString(build).setSource(source); diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp index e47a4efe0b..bf37d51c40 100644 --- a/qmake/library/qmakeglobals.cpp +++ b/qmake/library/qmakeglobals.cpp @@ -249,7 +249,8 @@ void QMakeGlobals::setDirectories(const QString &input_dir, const QString &outpu int srcLen = srcpath.length(); int dstLen = dstpath.length(); int lastSl = -1; - while (++lastSl, srcpath.at(--srcLen) == dstpath.at(--dstLen)) + while (++lastSl, --srcLen, --dstLen, + srcLen && dstLen && srcpath.at(srcLen) == dstpath.at(dstLen)) if (srcpath.at(srcLen) == QLatin1Char('/')) lastSl = 0; source_root = srcpath.left(srcLen + lastSl); |