Changeset 561 for trunk/qmake/generators
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/qmake/generators/mac/pbuilder_pbx.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 157 157 if(!profile.endsWith(Option::dir_sep)) 158 158 profile += Option::dir_sep; 159 profile += fi.baseName() + ".pro";159 profile += fi.baseName() + Option::pro_ext; 160 160 fi = QFileInfo(profile); 161 161 } -
trunk/qmake/generators/mac/pbuilder_pbx.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/makefile.cpp
r535 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 122 122 if(path.startsWith(QDir::separator())) { 123 123 d.cd(QString(QDir::separator())); 124 path = path.right(path.length() -1);124 path.remove(0, 1); 125 125 } 126 126 bool ret = true; … … 130 130 if(QFile::exists(path.left(3))) { 131 131 d.cd(path.left(3)); 132 path = path.right(path.length() -3);132 path.remove(0, 3); 133 133 } else { 134 134 warn_msg(WarnLogic, "Cannot access drive '%s' (%s)", … … 202 202 v.contains("QMAKE_ABSOLUTE_SOURCE_ROOT")) { 203 203 QString root = v["QMAKE_ABSOLUTE_SOURCE_ROOT"].first(); 204 root = Option::fixPathToTargetOS(root);204 root = QDir::fromNativeSeparators(root); 205 205 if(!root.isEmpty()) { 206 206 QFileInfo fi = fileInfo(Option::mkfile::cachefile); … … 208 208 QString cache_r = fi.path(), pwd = Option::output_dir; 209 209 if(pwd.startsWith(cache_r) && !pwd.startsWith(root)) { 210 pwd = Option::fixPathToTargetOS(root + pwd.mid(cache_r.length()));210 pwd = root + pwd.mid(cache_r.length()); 211 211 if(exists(pwd)) 212 212 v.insert("QMAKE_ABSOLUTE_SOURCE_PATH", QStringList(pwd)); … … 218 218 if(!v["QMAKE_ABSOLUTE_SOURCE_PATH"].isEmpty()) { 219 219 QString &asp = v["QMAKE_ABSOLUTE_SOURCE_PATH"].first(); 220 asp = Option::fixPathToTargetOS(asp);220 asp = QDir::fromNativeSeparators(asp); 221 221 if(asp.isEmpty() || asp == Option::output_dir) //if they're the same, why bother? 222 222 v["QMAKE_ABSOLUTE_SOURCE_PATH"].clear(); … … 244 244 #endif 245 245 { 246 if( pathRef.right(Option::dir_sep.length()) != Option::dir_sep)246 if(!pathRef.endsWith(Option::dir_sep)) 247 247 pathRef += Option::dir_sep; 248 248 } … … 276 276 if(slash != -1) { 277 277 path = path.left(slash); 278 if(path != "." && 279 !mkdir(fileFixify(path, qmake_getpwd(), Option::output_dir))) 280 warn_msg(WarnLogic, "%s: Cannot access directory '%s'", 281 (*it).toLatin1().constData(), path.toLatin1().constData()); 278 // Make out path only if it does not contain makefile variables 279 if(!path.contains("${")) 280 if(path != "." && 281 !mkdir(fileFixify(path, qmake_getpwd(), Option::output_dir))) 282 warn_msg(WarnLogic, "%s: Cannot access directory '%s'", 283 (*it).toLatin1().constData(), path.toLatin1().constData()); 282 284 } 283 285 } … … 290 292 v.remove("DESTDIR"); 291 293 } 292 QDir::current().cd(currentDir);293 294 } 294 295 … … 346 347 if(exists(real_dir + QDir::separator() + val)) { 347 348 QString dir = (*vpath_it); 348 if( dir.right(Option::dir_sep.length()) != Option::dir_sep)349 if(!dir.endsWith(Option::dir_sep)) 349 350 dir += Option::dir_sep; 350 351 val = dir + val; … … 365 366 if(!(flags & VPATH_NoFixify)) 366 367 real_dir = fileFixify(real_dir, qmake_getpwd(), Option::output_dir); 367 regex = regex.right(regex.length() -dir.length());368 regex.remove(0, dir.length()); 368 369 } 369 370 if(real_dir.isEmpty() || exists(real_dir)) { … … 725 726 QString cache_file; 726 727 if(!project->isEmpty("QMAKE_INTERNAL_CACHE_FILE")) { 727 cache_file = Option::fixPathToLocalOS(project->first("QMAKE_INTERNAL_CACHE_FILE"));728 cache_file = QDir::fromNativeSeparators(project->first("QMAKE_INTERNAL_CACHE_FILE")); 728 729 } else { 729 730 cache_file = ".qmake.internal.cache"; … … 731 732 cache_file += ".BUILD." + project->first("BUILD_PASS"); 732 733 } 733 if(cache_file.indexOf( QDir::separator()) == -1)734 cache_file.prepend(Option::output_dir + QDir::separator());734 if(cache_file.indexOf('/') == -1) 735 cache_file.prepend(Option::output_dir + '/'); 735 736 QMakeSourceFileInfo::setCacheFile(cache_file); 736 737 } … … 789 790 if(regex.lastIndexOf(Option::dir_sep) != -1) { 790 791 dir = regex.left(regex.lastIndexOf(Option::dir_sep) + 1); 791 regex = regex.right(regex.length() -dir.length());792 regex.remove(0, dir.length()); 792 793 } 793 794 QStringList files = QDir(dir).entryList(QStringList(regex)); … … 939 940 int slsh = target.lastIndexOf(Option::dir_sep); 940 941 if(slsh != -1) 941 target = target.right(target.length() - slsh -1);942 target.remove(0, slsh + 1); 942 943 QString bdir = Option::output_dir; 943 944 if(bdir.isEmpty()) … … 968 969 if(project->isActiveConfig("staticlib") || project->isActiveConfig("explicitlib") || 969 970 !project->isEmpty("PRL_EXPORT_LIBS")) { 971 if(project->isActiveConfig("staticlib")) 972 libs << "QMAKE_LIBS_PRIVATE"; 970 973 t << "QMAKE_PRL_LIBS = "; 971 974 if (!project->isEmpty("PRL_EXPORT_LIBS")) { … … 1066 1069 int slsh = ret.lastIndexOf(Option::dir_sep); 1067 1070 if(slsh != -1) 1068 ret = ret.right(ret.length() -slsh);1071 ret.remove(0, slsh); 1069 1072 if(!ret.endsWith(Option::prl_ext)) { 1070 1073 int dot = ret.indexOf('.'); 1071 1074 if(dot != -1) 1072 ret = ret.left(dot);1075 ret.truncate(dot); 1073 1076 ret += Option::prl_ext; 1074 1077 } … … 1269 1272 if(slsh != -1) { 1270 1273 dirstr = filestr.left(slsh+1); 1271 filestr = filestr.right(filestr.length() - slsh -1);1272 } 1273 if( dirstr.right(Option::dir_sep.length()) != Option::dir_sep)1274 filestr.remove(0, slsh+1); 1275 } 1276 if(!dirstr.endsWith(Option::dir_sep)) 1274 1277 dirstr += Option::dir_sep; 1275 1278 if(exists(wild)) { //real file … … 1371 1374 for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) { 1372 1375 QString tmp_dst = fileFixify((*pit), FileFixifyAbsolute, false); 1373 if (!isDosLikeShell() && tmp_dst.right(1) != Option::dir_sep)1376 if (!isDosLikeShell() && !tmp_dst.endsWith(Option::dir_sep)) 1374 1377 tmp_dst += Option::dir_sep; 1375 1378 t << mkdir_p_asstring(filePrefixRoot(root, tmp_dst)) << "\n\t"; … … 1522 1525 } 1523 1526 if(val.isEmpty() && var.startsWith(QLatin1String("QMAKE_VAR_FIRST_"))) { 1524 const QString varname = var.mid(1 2);1527 const QString varname = var.mid(16); 1525 1528 val += project->first(varname); 1526 1529 } … … 1610 1613 if(!file.isNull()) { 1611 1614 QMakeSourceFileInfo::addSourceFile(file, QMakeSourceFileInfo::SEEK_MOCS); 1612 if(!mocable(file)) 1615 if(!mocable(file)) { 1613 1616 return false; 1617 } else { 1618 project->values("MOCABLES").append(file); 1619 } 1614 1620 } 1615 1621 } else if(project->values(comp + ".CONFIG").indexOf("function_verify") != -1) { … … 1728 1734 t << "\n\t" << cmd; 1729 1735 t << endl << endl; 1736 1737 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(targ); 1738 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(targ)) << deps.split(" ", QString::SkipEmptyParts); 1739 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(targ)) << cmd; 1730 1740 } 1731 1741 } … … 1817 1827 const QString del_suffix = 1818 1828 Option::target_mode == Option::TARG_OS2_MODE ? 1819 QString(" >nul 2>&1"): // reduce noise 1829 QString(" >nul 2>&1") : // reduce noise 1830 isForSymbian() ? 1831 QString(" 2> NUL") : 1820 1832 QString::null; 1821 1833 1822 1834 if(tmp_clean.indexOf("${QMAKE_") == -1) { 1823 1835 t << "\n\t" << del_statement << " " << tmp_clean << del_suffix; 1836 if (isForSymbian()) 1837 t << " 2> NUL"; // Eliminate unnecessary warnings 1824 1838 wrote_clean = true; 1825 1839 } … … 1927 1941 continue; 1928 1942 1929 QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out)); 1943 QString cmd; 1944 if (isForSymbianSbsv2()) { 1945 // In sbsv2 the command inputs and outputs need to use absolute paths 1946 cmd = replaceExtraCompilerVariables(tmp_cmd, 1947 fileFixify(escapeFilePaths(inputs), FileFixifyAbsolute), 1948 fileFixify(QStringList(tmp_out), FileFixifyAbsolute)); 1949 } else { 1950 cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out)); 1951 } 1952 1930 1953 t << escapeDependencyPath(tmp_out) << ":"; 1954 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); 1931 1955 // compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies 1932 1956 if(project->values((*it) + ".CONFIG").indexOf("explicit_dependencies") != -1) { 1933 1957 t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir))); 1958 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << tmp_dep; 1934 1959 } else { 1935 1960 t << " " << valList(escapeDependencyPaths(inputs)) << " " << valList(escapeDependencyPaths(deps)); 1961 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << inputs << deps; 1936 1962 } 1937 1963 t << "\n\t" << cmd << endl << endl; 1964 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(tmp_out)) << cmd; 1938 1965 continue; 1939 1966 } … … 1949 1976 } 1950 1977 QString cmd = replaceExtraCompilerVariables(tmp_cmd, (*input), out); 1978 // NOTE: The var -> QMAKE_COMP_var replace feature is unsupported, do not use! 1979 if (isForSymbianSbsv2()) { 1980 // In sbsv2 the command inputs and outputs need to use absolute paths 1981 cmd = replaceExtraCompilerVariables(tmp_cmd, 1982 fileFixify((*input), FileFixifyAbsolute), 1983 fileFixify(out, FileFixifyAbsolute)); 1984 } else { 1985 cmd = replaceExtraCompilerVariables(tmp_cmd, (*input), out); 1986 } 1951 1987 for(QStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3) 1952 1988 cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); … … 2038 2074 t << escapeDependencyPath(out) << ": " << valList(escapeDependencyPaths(deps)) << "\n\t" 2039 2075 << cmd << endl << endl; 2076 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(out); 2077 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(out)) << deps; 2078 project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(out)) << cmd; 2040 2079 } 2041 2080 } … … 2153 2192 else if(Option::target_mode == Option::TARG_OS2_MODE) 2154 2193 ret += " -os2"; 2155 else if(Option::target_mode == Option::TARG_QNX6_MODE)2156 ret += " -qnx6";2157 2194 2158 2195 //configs … … 2213 2250 } 2214 2251 2215 void 2216 MakefileGenerator:: writeSubDirs(QTextStream &t)2252 QList<MakefileGenerator::SubTarget*> 2253 MakefileGenerator::findSubDirsSubTargets() const 2217 2254 { 2218 2255 QList<SubTarget*> targets; … … 2256 2293 st->in_directory = file; 2257 2294 } 2258 while(st->in_directory. right(1) == Option::dir_sep)2259 st->in_directory = st->in_directory.left(st->in_directory.length() -1);2295 while(st->in_directory.endsWith(Option::dir_sep)) 2296 st->in_directory.chop(1); 2260 2297 if(fileInfo(st->in_directory).isRelative()) 2261 2298 st->out_directory = st->in_directory; … … 2311 2348 } 2312 2349 } 2350 return targets; 2351 } 2352 2353 void 2354 MakefileGenerator::writeSubDirs(QTextStream &t) 2355 { 2356 QList<SubTarget*> targets = findSubDirsSubTargets(); 2313 2357 t << "first: make_default" << endl; 2314 2358 int flags = SubTargetInstalls; … … 2327 2371 t << "include " << (*qeui_it) << endl; 2328 2372 2329 QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); 2330 if(ofile.lastIndexOf(Option::dir_sep) != -1) 2331 ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) -1); 2332 t << "MAKEFILE = " << ofile << endl; 2333 /* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires 2334 * back-slashes to be turned into slashes. */ 2335 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; 2336 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 2337 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 2338 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 2339 t << "COPY = " << var("QMAKE_COPY") << endl; 2340 t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl; 2341 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 2342 t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; 2343 t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; 2344 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; 2345 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 2346 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 2347 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 2348 t << "MOVE = " << var("QMAKE_MOVE") << endl; 2349 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 2350 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 2373 if (!(flags & SubTargetSkipDefaultVariables)) { 2374 QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); 2375 if(ofile.lastIndexOf(Option::dir_sep) != -1) 2376 ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1); 2377 t << "MAKEFILE = " << ofile << endl; 2378 /* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires 2379 * back-slashes to be turned into slashes. */ 2380 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; 2381 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 2382 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 2383 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 2384 t << "COPY = " << var("QMAKE_COPY") << endl; 2385 t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl; 2386 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 2387 t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; 2388 t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; 2389 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; 2390 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 2391 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 2392 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 2393 t << "MOVE = " << var("QMAKE_MOVE") << endl; 2394 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 2395 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 2396 t << "SUBTARGETS = "; // subtargets are sub-directory 2397 for(int target = 0; target < targets.size(); ++target) 2398 t << " \\\n\t\t" << targets.at(target)->target; 2399 t << endl << endl; 2400 } 2351 2401 writeExtraVariables(t); 2352 t << "SUBTARGETS = "; // subtargets are sub-directory2353 for(int target = 0; target < targets.size(); ++target)2354 t << " \\\n\t\t" << targets.at(target)->target;2355 t << endl << endl;2356 2402 2357 2403 QStringList targetSuffixes; 2358 2404 const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); 2359 targetSuffixes << "make_default" << "make_first" << "all" << "clean" << "distclean" 2360 << QString((flags & SubTargetInstalls) ? "install_subtargets" : "install") 2361 << QString((flags & SubTargetInstalls) ? "uninstall_subtargets" : "uninstall"); 2405 if (!(flags & SubTargetSkipDefaultTargets)) { 2406 targetSuffixes << "make_default" << "make_first" << "all" << "clean" << "distclean" 2407 << QString((flags & SubTargetInstalls) ? "install_subtargets" : "install") 2408 << QString((flags & SubTargetInstalls) ? "uninstall_subtargets" : "uninstall"); 2409 } 2362 2410 2363 2411 // generate target rules … … 2479 2527 t << endl; 2480 2528 2481 if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) 2482 project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); 2483 2484 writeMakeQmake(t); 2485 2486 t << "qmake_all:"; 2487 if(!targets.isEmpty()) { 2488 for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it) { 2489 if(!(*it)->profile.isEmpty()) 2490 t << " " << (*it)->target << "-" << "qmake_all"; 2491 } 2492 } 2493 if(project->isEmpty("QMAKE_NOFORCE")) 2494 t << " FORCE"; 2495 if(project->isActiveConfig("no_empty_targets")) 2496 t << "\n\t" << "@cd ."; 2497 t << endl << endl; 2529 if (!(flags & SubTargetSkipDefaultTargets)) { 2530 if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) 2531 project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); 2532 2533 writeMakeQmake(t); 2534 2535 t << "qmake_all:"; 2536 if(!targets.isEmpty()) { 2537 for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it) { 2538 if(!(*it)->profile.isEmpty()) 2539 t << " " << (*it)->target << "-" << "qmake_all"; 2540 } 2541 } 2542 if(project->isEmpty("QMAKE_NOFORCE")) 2543 t << " FORCE"; 2544 if(project->isActiveConfig("no_empty_targets")) 2545 t << "\n\t" << "@cd ."; 2546 t << endl << endl; 2547 } 2498 2548 2499 2549 for(int s = 0; s < targetSuffixes.size(); ++s) { … … 2504 2554 t << suffix << ":"; 2505 2555 for(int target = 0; target < targets.size(); ++target) { 2506 QString targetRule = targets.at(target)->target + "-" + suffix; 2556 SubTarget *subTarget = targets.at(target); 2557 if((suffix == "make_first" || suffix == "make_default") 2558 && project->values(subTarget->name + ".CONFIG").indexOf("no_default_target") != -1) { 2559 continue; 2560 } 2561 QString targetRule = subTarget->target + "-" + suffix; 2507 2562 if(flags & SubTargetOrdered) 2508 2563 targetRule += "-ordered"; … … 2768 2823 2769 2824 //do the fixin' 2770 const QString pwd = qmake_getpwd() + "/"; 2825 QString pwd = qmake_getpwd(); 2826 if (!pwd.endsWith('/')) 2827 pwd += '/'; 2771 2828 QString orig_file = ret; 2772 2829 if(ret.startsWith(QLatin1Char('~'))) { 2773 2830 if(ret.startsWith(QLatin1String("~/"))) 2774 ret = QDir::homePath() + Option::dir_sep +ret.mid(1);2831 ret = QDir::homePath() + ret.mid(1); 2775 2832 else 2776 2833 warn_msg(WarnLogic, "Unable to expand ~ in %s", ret.toLatin1().constData()); … … 2861 2918 int slsh = f.lastIndexOf(Option::dir_sep); 2862 2919 if(slsh != -1) 2863 file = file.right(file.length() - slsh -1);2920 file.remove(0, slsh + 1); 2864 2921 QStringList &l = project->values(w); 2865 2922 for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { … … 2867 2924 slsh = file2.lastIndexOf(Option::dir_sep); 2868 2925 if(slsh != -1) 2869 file2 = file2.right(file2.length() - slsh -1);2926 file2.remove(0, slsh + 1); 2870 2927 if(file2 == file) { 2871 2928 warn_msg(WarnLogic, "Found potential symbol conflict of %s (%s) in %s", … … 3021 3078 QFileInfo fi(fileInfo(file.fileName())); 3022 3079 if(fi.isDir()) 3023 outdir = file.fileName() + QDir::separator();3080 outdir = file.fileName() + '/'; 3024 3081 } 3025 3082 if(!outdir.isEmpty() || file.fileName().isEmpty()) { … … 3041 3098 if(project->isEmpty("QMAKE_MAKEFILE")) 3042 3099 project->values("QMAKE_MAKEFILE").append(file.fileName()); 3043 int slsh = file.fileName().lastIndexOf( Option::dir_sep);3100 int slsh = file.fileName().lastIndexOf('/'); 3044 3101 if(slsh != -1) 3045 3102 mkdir(file.fileName().left(slsh)); … … 3051 3108 else 3052 3109 od = fi.path(); 3053 od = Option::fixPathToTargetOS(od); 3054 if(QDir::isRelativePath(od)) 3055 od.prepend(Option::output_dir); 3110 od = QDir::fromNativeSeparators(od); 3111 if(QDir::isRelativePath(od)) { 3112 QString dir = Option::output_dir; 3113 if (!dir.endsWith('/') && !od.isEmpty()) 3114 dir += '/'; 3115 od.prepend(dir); 3116 } 3056 3117 Option::output_dir = od; 3057 3118 return true; -
trunk/qmake/generators/makefile.h
r29 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 117 117 SubTargetInstalls=0x01, 118 118 SubTargetOrdered=0x02, 119 SubTargetSkipDefaultVariables=0x04, 120 SubTargetSkipDefaultTargets=0x08, 119 121 120 122 SubTargetsNoFlags=0x00 121 123 }; 124 QList<MakefileGenerator::SubTarget*> findSubDirsSubTargets() const; 122 125 void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags); 123 126 -
trunk/qmake/generators/makefiledeps.cpp
r363 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 379 379 file->dep_checked = true; 380 380 381 const QMakeLocalFileName sourceFile = fixPathForFile(file->file, true); 382 381 383 struct stat fst; 382 384 char *buffer = 0; … … 385 387 int fd; 386 388 #if defined(_MSC_VER) && _MSC_VER >= 1400 387 if (_sopen_s(&fd, fixPathForFile(file->file, true).local().toLatin1().constData(),389 if (_sopen_s(&fd, sourceFile.local().toLatin1().constData(), 388 390 _O_RDONLY, _SH_DENYNO, _S_IREAD) != 0) 389 391 fd = -1; 390 392 #else 391 fd = open( fixPathForFile(file->file, true).local().toLatin1().constData(), O_RDONLY);393 fd = open(sourceFile.local().toLatin1().constData(), O_RDONLY); 392 394 #endif 393 395 if(fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) … … 624 626 if(QDir::isRelativePath(lfn.real())) { 625 627 if(try_local) { 626 QString dir = findFileInfo(file->file).path(); 627 if(QDir::isRelativePath(dir)) 628 dir.prepend(qmake_getpwd() + "/"); 629 if(!dir.endsWith("/")) 630 dir += "/"; 631 QMakeLocalFileName f(dir + lfn.local()); 628 QDir sourceDir = findFileInfo(sourceFile).dir(); 629 QMakeLocalFileName f(sourceDir.absoluteFilePath(lfn.local())); 632 630 if(findFileInfo(f).exists()) { 633 631 lfn = fixPathForFile(f); -
trunk/qmake/generators/makefiledeps.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/metamakefile.cpp
r363 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 class BuildsMetaMakefileGenerator : public MetaMakefileGenerator 62 62 { 63 private: 63 64 bool init_flag; 64 private:65 65 struct Build { 66 66 QString name, build; … … 137 137 build->name = name; 138 138 build->makefile = createMakefileGenerator(project, false); 139 makefiles += build; 139 if (build->makefile){ 140 makefiles += build; 141 }else { 142 delete build; 143 return false; 144 } 140 145 } 141 146 return true; … … 259 264 class SubdirsMetaMakefileGenerator : public MetaMakefileGenerator 260 265 { 266 protected: 261 267 bool init_flag; 262 private:263 268 struct Subdir { 264 269 Subdir() : makefile(0), indent(0) { } … … 287 292 return false; 288 293 init_flag = true; 294 bool hasError = false; 289 295 290 296 if(Option::recursive) { 291 QString old_output_dir = QDir::cleanPath(Option::output_dir); 292 if(!old_output_dir.endsWith('/')) 293 old_output_dir += '/'; 297 QString old_output_dir = Option::output_dir; 294 298 QString old_output = Option::output.fileName(); 295 QString oldpwd = QDir::cleanPath(qmake_getpwd()); 296 if(!oldpwd.endsWith('/')) 297 oldpwd += '/'; 299 QString oldpwd = qmake_getpwd(); 300 QString thispwd = oldpwd; 301 if(!thispwd.endsWith('/')) 302 thispwd += '/'; 298 303 const QStringList &subdirs = project->values("SUBDIRS"); 299 304 static int recurseDepth = -1; … … 315 320 if(!subdir.isRelative()) { //we can try to make it relative 316 321 QString subdir_path = subdir.filePath(); 317 if(subdir_path.startsWith( oldpwd))318 subdir = QFileInfo(subdir_path.mid( oldpwd.length()));322 if(subdir_path.startsWith(thispwd)) 323 subdir = QFileInfo(subdir_path.mid(thispwd.length())); 319 324 } 320 325 … … 333 338 qmake_setpwd(sub->input_dir); 334 339 Option::output_dir = sub->output_dir; 335 if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/')) 336 Option::output_dir += QLatin1Char('/'); 337 sub_proj->read(subdir.fileName()); 340 bool tmpError = !sub_proj->read(subdir.fileName()); 338 341 if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { 339 342 fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n", … … 342 345 delete sub; 343 346 delete sub_proj; 347 Option::output_dir = old_output_dir; 348 qmake_setpwd(oldpwd); 344 349 continue; 350 } else { 351 hasError |= tmpError; 345 352 } 346 353 sub->makefile = MetaMakefileGenerator::createMetaGenerator(sub_proj, sub_name); … … 350 357 const QString output_name = Option::output.fileName(); 351 358 Option::output.setFileName(sub->output_file); 352 sub->makefile->write(sub->output_dir);359 hasError |= !sub->makefile->write(sub->output_dir); 353 360 delete sub; 354 361 qmakeClearCaches(); … … 374 381 self->makefile->init(); 375 382 subs.append(self); 376 return true; 383 384 return !hasError; 377 385 } 378 386 … … 428 436 #include "msvc_dsp.h" 429 437 #include "msvc_vcproj.h" 438 #include "symmake_abld.h" 439 #include "symmake_sbsv2.h" 430 440 QT_END_INCLUDE_NAMESPACE 431 441 … … 442 452 QString gen = proj->first("MAKEFILE_GENERATOR"); 443 453 if(gen.isEmpty()) { 444 fprintf(stderr, " No generator specified in config file: %s\n",454 fprintf(stderr, "MAKEFILE_GENERATOR variable not set as a result of parsing : %s. Possibly qmake was not able to find files included using \"include(..)\" - enable qmake debugging to investigate more.\n", 445 455 proj->projectFile().toLatin1().constData()); 446 456 } else if(gen == "UNIX") { … … 466 476 } else if(gen == "BMAKE") { 467 477 mkfile = new BorlandMakefileGenerator; 478 } else if(gen == "SYMBIAN_ABLD") { 479 mkfile = new SymbianAbldMakefileGenerator; 480 } else if(gen == "SYMBIAN_SBSV2") { 481 mkfile = new SymbianSbsv2MakefileGenerator; 468 482 } else { 469 483 fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); … … 477 491 478 492 MetaMakefileGenerator * 479 MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op )493 MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op, bool *success) 480 494 { 481 495 MetaMakefileGenerator *ret = 0; 482 if ((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||483 Option::qmake_mode == Option::QMAKE_GENERATE_PRL)) {484 if (proj->first("TEMPLATE").endsWith("subdirs"))496 if ((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || 497 Option::qmake_mode == Option::QMAKE_GENERATE_PRL)) { 498 if (proj->first("TEMPLATE").endsWith("subdirs")) 485 499 ret = new SubdirsMetaMakefileGenerator(proj, name, op); 486 500 } 487 if (!ret)501 if (!ret) 488 502 ret = new BuildsMetaMakefileGenerator(proj, name, op); 489 ret->init(); 503 bool res = ret->init(); 504 if (success) 505 *success = res; 490 506 return ret; 491 507 } -
trunk/qmake/generators/metamakefile.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 63 63 virtual ~MetaMakefileGenerator(); 64 64 65 static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true );65 static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success = 0); 66 66 static MakefileGenerator *createMakefileGenerator(QMakeProject *proj, bool noIO = false); 67 67 -
trunk/qmake/generators/projectgenerator.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/projectgenerator.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/unix/unixmake.cpp
r27 r561 1 1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 5 ** 6 ** This file is part of the qmake application of the Qt Toolkit. 7 ** 8 ** $QT_BEGIN_LICENSE:LGPL$ 2 ** 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 6 ** 7 ** This file is part of the qmake application of the Qt Toolkit. 8 ** 9 ** $QT_BEGIN_LICENSE:LGPL$ 9 10 ** Commercial Usage 10 11 ** Licensees holding valid Qt Commercial licenses may use this file in … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 ** 40 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 41 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 42 ** 43 ****************************************************************************/ 39 ** 40 ****************************************************************************/ 44 41 45 42 #include "unixmake.h" … … 92 89 project->values("QMAKE_LIBTOOL").append("libtool --silent"); 93 90 if(project->isEmpty("QMAKE_SYMBOLIC_LINK")) 94 project->values("QMAKE_SYMBOLIC_LINK").append("ln - sf");91 project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s"); 95 92 96 93 /* this should probably not be here, but I'm using it to wrap the .t files */ … … 128 125 project->values("QMAKE_ORIG_DESTDIR") = project->values("DESTDIR"); 129 126 project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); 127 project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); 130 128 if((!project->isEmpty("QMAKE_LIB_FLAG") && !project->isActiveConfig("staticlib")) || 131 129 (project->isActiveConfig("qt") && project->isActiveConfig("plugin"))) { … … 262 260 else if(!bundle.endsWith(".plugin")) 263 261 bundle += ".plugin"; 264 if( !project->isEmpty("QMAKE_BUNDLE_LOCATION"))262 if(project->isEmpty("QMAKE_BUNDLE_LOCATION")) 265 263 project->values("QMAKE_BUNDLE_LOCATION").append("Contents/MacOS"); 266 264 } else { … … 442 440 frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks")); 443 441 frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks")); 444 const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };442 const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", QString() }; 445 443 for(int i = 0; !lflags[i].isNull(); i++) { 446 444 QStringList &l = project->values(lflags[i]); … … 764 762 ret += QString("\n\t$(RANLIB) \"") + dst_targ + "\""; 765 763 } else if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") && !project->isEmpty("QMAKE_STRIP")) { 766 ret += "\n\t- " + var("QMAKE_STRIP");764 ret += "\n\t-$(STRIP)"; 767 765 if(project->first("TEMPLATE") == "lib" && !project->isEmpty("QMAKE_STRIPFLAGS_LIB")) 768 766 ret += " " + var("QMAKE_STRIPFLAGS_LIB"); -
trunk/qmake/generators/unix/unixmake.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/unix/unixmake2.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 150 150 t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; 151 151 t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_FRAMEWORKDIR_FLAGS") << " " 152 << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;152 << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl; 153 153 } 154 154 … … 164 164 t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl; 165 165 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 166 t << "STRIP = " << var("QMAKE_STRIP") << endl; 166 167 t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; 167 168 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; … … 1424 1425 1425 1426 // libs 1426 QStringList libs;1427 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) {1428 libs = project->values("QMAKE_INTERNAL_PRL_LIBS");1429 } else {1430 libs << "QMAKE_LIBS"; //obvious one1431 }1432 libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?1433 1427 t << "Libs: "; 1434 1428 QString pkgConfiglibDir; … … 1450 1444 } 1451 1445 t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl; 1446 1447 QStringList libs; 1448 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) { 1449 libs = project->values("QMAKE_INTERNAL_PRL_LIBS"); 1450 } else { 1451 libs << "QMAKE_LIBS"; //obvious one 1452 } 1453 libs << "QMAKE_LIBS_PRIVATE"; 1454 libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread? 1452 1455 t << "Libs.private: "; 1453 1456 for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) { -
trunk/qmake/generators/win32/borland_bmake.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/win32/borland_bmake.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/win32/mingw_make.cpp
r29 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 83 83 bool MingwMakefileGenerator::findLibraries() 84 84 { 85 QStringList &l = project->values("QMAKE_LIBS"); 85 return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE"); 86 } 87 88 bool MingwMakefileGenerator::findLibraries(const QString &where) 89 { 90 QStringList &l = project->values(where); 86 91 87 92 QList<QMakeLocalFileName> dirs; … … 259 264 // LIBS defined in Profile comes first for gcc 260 265 project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); 266 project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); 261 267 262 268 QString targetfilename = project->values("TARGET").first(); … … 345 351 if(!project->values("QMAKE_LIBDIR").isEmpty()) 346 352 writeLibDirPart(t); 347 t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl; 353 t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' ' 354 << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl; 348 355 } 349 356 } -
trunk/qmake/generators/win32/mingw_make.h
r29 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 74 74 virtual bool findLibraries(); 75 bool findLibraries(const QString &where); 75 76 void fixTargetExt(); 76 77 -
trunk/qmake/generators/win32/msvc_dsp.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 683 683 if(!profile.endsWith(Option::dir_sep)) 684 684 profile += Option::dir_sep; 685 profile += fi.baseName() + ".pro";685 profile += fi.baseName() + Option::pro_ext; 686 686 subdirs.append(profile); 687 687 } else { -
trunk/qmake/generators/win32/msvc_dsp.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/win32/msvc_nmake.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 173 173 174 174 project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); 175 project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); 175 176 processVars(); 176 177 -
trunk/qmake/generators/win32/msvc_nmake.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/win32/msvc_objectmodel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 50 50 const char _Configuration[] = "Configuration"; 51 51 const char _Configurations[] = "Configurations"; 52 const char _File[] = "File";52 const char q_File[] = "File"; 53 53 const char _FileConfiguration[] = "FileConfiguration"; 54 const char _Files[] = "Files";54 const char q_Files[] = "Files"; 55 55 const char _Filter[] = "Filter"; 56 56 const char _Globals[] = "Globals"; … … 485 485 if (opt.contains('a') && !opt.contains('s') && !opt.contains('c')) 486 486 ExceptionHandling = ehSEH; 487 else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) 487 else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) 488 488 ExceptionHandling = ehNone; 489 489 else if (!opt.contains('a') && opt.contains('s') && opt.contains('c')) … … 1395 1395 TargetMachine = machineX86; 1396 1396 break; 1397 case 0x0005b94: // X64 1398 TargetMachine = machineX64; 1399 break; 1397 1400 // so we put the others in AdditionalOptions... 1398 case 0x0005b94: // X641399 1401 case 0x0046063: // AM33 1400 1402 case 0x000466d: // ARM … … 2382 2384 for (int i = 0; i < tool.Files.count(); ++i) { 2383 2385 const VCFilterFile &info = tool.Files.at(i); 2384 xml << tag( _File)2386 xml << tag(q_File) 2385 2387 << attrS(_RelativePath, Option::fixPathToLocalOS(info.file)) 2386 2388 << data(); // In case no custom builds, to avoid "/>" endings 2387 2389 tool.outputFileConfig(xml, tool.Files.at(i).file); 2388 xml << closetag( _File);2390 xml << closetag(q_File); 2389 2391 } 2390 2392 if (!tool.Name.isEmpty()) … … 2422 2424 << tool.Configuration; 2423 2425 xml << closetag(_Configurations) 2424 << tag( _Files);2426 << tag(q_Files); 2425 2427 // Add this configuration into a multi-config project, since that's where we have the flat/tree 2426 2428 // XML output functionality … … 2438 2440 } 2439 2441 tempProj.outputFilter(xml, "RootFiles"); 2440 xml << closetag( _Files)2442 xml << closetag(q_Files) 2441 2443 << tag(_Globals) 2442 2444 << data(); // No "/>" end tag … … 2493 2495 const QString &filtername) 2494 2496 { 2495 xml << tag( _File)2497 xml << tag(q_File) 2496 2498 << attrS(_RelativePath, Option::fixPathToLocalOS(info.file)); 2497 2499 for (int i = 0; i < SingleProjects.count(); ++i) { … … 2521 2523 filter.outputFileConfig(xml, info.file); 2522 2524 } 2523 xml << closetag( _File);2525 xml << closetag(q_File); 2524 2526 } 2525 2527 … … 2616 2618 xml << tool.SingleProjects.at(i).Configuration; 2617 2619 xml << closetag(_Configurations) 2618 << tag( _Files);2620 << tag(q_Files); 2619 2621 tool.outputFilter(xml, "Sources"); 2620 2622 tool.outputFilter(xml, "Headers"); … … 2628 2630 } 2629 2631 tool.outputFilter(xml, "RootFiles"); 2630 xml << closetag( _Files)2632 xml << closetag(q_Files) 2631 2633 << tag(_Globals) 2632 2634 << data(); // No "/>" end tag -
trunk/qmake/generators/win32/msvc_objectmodel.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 299 299 enum machineTypeOption { 300 300 machineNotSet, 301 machineX86 301 machineX86, 302 machineX64 = 17 302 303 }; 303 304 enum midlCharOption { -
trunk/qmake/generators/win32/msvc_vcproj.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 121 121 122 122 HKEY handle = 0; 123 LONG res; 124 QT_WA( { 125 res = RegOpenKeyExW(parentHandle, (WCHAR*)rSubkeyPath.utf16(), 126 0, KEY_READ, &handle); 127 } , { 128 res = RegOpenKeyExA(parentHandle, rSubkeyPath.toLocal8Bit(), 129 0, KEY_READ, &handle); 130 } ); 123 LONG res = RegOpenKeyEx(parentHandle, (wchar_t*)rSubkeyPath.utf16(), 0, KEY_READ, &handle); 131 124 132 125 if (res != ERROR_SUCCESS) … … 136 129 DWORD dataType; 137 130 DWORD dataSize; 138 QT_WA( { 139 res = RegQueryValueExW(handle, (WCHAR*)rSubkeyName.utf16(), 0, &dataType, 0, &dataSize); 140 }, { 141 res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, &dataType, 0, &dataSize); 142 } ); 131 res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, &dataType, 0, &dataSize); 143 132 if (res != ERROR_SUCCESS) { 144 133 RegCloseKey(handle); … … 148 137 // get the value 149 138 QByteArray data(dataSize, 0); 150 QT_WA( { 151 res = RegQueryValueExW(handle, (WCHAR*)rSubkeyName.utf16(), 0, 0, 152 reinterpret_cast<unsigned char*>(data.data()), &dataSize); 153 }, { 154 res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, 0, 155 reinterpret_cast<unsigned char*>(data.data()), &dataSize); 156 } ); 139 res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, 0, 140 reinterpret_cast<unsigned char*>(data.data()), &dataSize); 157 141 if (res != ERROR_SUCCESS) { 158 142 RegCloseKey(handle); … … 164 148 case REG_EXPAND_SZ: 165 149 case REG_SZ: { 166 QT_WA( { 167 result = QString::fromUtf16(((const ushort*)data.constData())); 168 }, { 169 result = QString::fromLatin1(data.constData()); 170 } ); 150 result = QString::fromWCharArray(((const wchar_t *)data.constData())); 171 151 break; 172 152 } … … 176 156 int i = 0; 177 157 for (;;) { 178 QString s; 179 QT_WA( { 180 s = QString::fromUtf16((const ushort*)data.constData() + i); 181 }, { 182 s = QString::fromLatin1(data.constData() + i); 183 } ); 158 QString s = QString::fromWCharArray((const wchar_t *)data.constData() + i); 184 159 i += s.length() + 1; 185 160 … … 194 169 case REG_NONE: 195 170 case REG_BINARY: { 196 QT_WA( { 197 result = QString::fromUtf16((const ushort*)data.constData(), data.size()/2); 198 }, { 199 result = QString::fromLatin1(data.constData(), data.size()); 200 } ); 171 result = QString::fromWCharArray((const wchar_t *)data.constData(), data.size() / 2); 201 172 break; 202 173 } … … 525 496 if(!profile.endsWith(Option::dir_sep)) 526 497 profile += Option::dir_sep; 527 profile += fi.baseName() + ".pro";498 profile += fi.baseName() + Option::pro_ext; 528 499 subdirs.append(profile); 529 500 } else { … … 575 546 576 547 // We assume project filename is [QMAKE_ORIG_TARGET].vcproj 577 QString vcproj = unescapeFilePath( fixFilename(tmp_vcproj.project->first("QMAKE_ORIG_TARGET")) + project->first("VCPROJ_EXTENSION"));548 QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_ORIG_TARGET") + project->first("VCPROJ_EXTENSION")); 578 549 QString vcprojDir = qmake_getpwd(); 579 550 … … 653 624 654 625 // Add all unknown libs to the deps 655 QStringList where ("QMAKE_LIBS");626 QStringList where = QStringList() << "QMAKE_LIBS" << "QMAKE_LIBS_PRIVATE"; 656 627 if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS")) 657 628 where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"]; … … 1031 1002 if(project->isActiveConfig("debug")){ 1032 1003 // Debug version 1033 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));1034 1004 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG")); 1035 1005 if((projectTarget == Application) || (projectTarget == StaticLib)) … … 1039 1009 } else { 1040 1010 // Release version 1041 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));1042 1011 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE")); 1043 1012 conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG"; … … 1204 1173 targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET"); 1205 1174 if (targetPath.endsWith("/") || targetPath.endsWith("\\")) 1206 targetPath = targetPath.mid(0,targetPath.size()-1);1175 targetPath.chop(1); 1207 1176 1208 1177 // Only deploy Qt libs for shared build … … 1271 1240 // get item.path 1272 1241 QString devicePath = project->first(item + ".path"); 1273 // if the path does not exist, skip it1274 1242 if (devicePath.isEmpty()) 1275 continue;1243 devicePath = targetPath; 1276 1244 // check if item.path is relative (! either /,\ or %) 1277 1245 if (!(devicePath.at(0) == QLatin1Char('/') … … 1583 1551 1584 1552 project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); 1553 project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); 1585 1554 1586 1555 // Get filename w/o extension ----------------------------------- … … 1626 1595 // $$QMAKE.. -> $$MSVCPROJ.. ------------------------------------- 1627 1596 project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS"); 1597 project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS_PRIVATE"); 1628 1598 project->values("MSVCPROJ_LFLAGS") += project->values("QMAKE_LFLAGS"); 1629 1599 if(!project->values("QMAKE_LIBDIR").isEmpty()) { -
trunk/qmake/generators/win32/msvc_vcproj.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/qmake/generators/win32/winmakefile.cpp
r547 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 433 433 rcFile.close(); 434 434 } 435 if (writeRcFile && rcFile.open(QFile::WriteOnly)) { 436 rcFile.write(rcString); 437 rcFile.close(); 435 if (writeRcFile) { 436 bool ok; 437 ok = rcFile.open(QFile::WriteOnly); 438 if (!ok) { 439 // The file can't be opened... try creating the containing 440 // directory first (needed for clean shadow builds) 441 QDir().mkpath(QFileInfo(rcFile).path()); 442 ok = rcFile.open(QFile::WriteOnly); 443 } 444 if (!ok) { 445 ::fprintf(stderr, "Cannot open for writing: %s", rcFile.fileName().toLatin1().constData()); 446 ::exit(1); 447 } 448 rcFile.write(rcString); 449 rcFile.close(); 438 450 } 439 451 if (project->values("QMAKE_WRITE_DEFAULT_RC").isEmpty()) … … 625 637 QString orgDestDir = var("DESTDIR"); 626 638 QString destDir = Option::fixPathToTargetOS(orgDestDir, false); 627 if ( orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep))639 if (!destDir.isEmpty() && (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep))) 628 640 destDir += Option::dir_sep; 629 641 QString target = project->first("TARGET_SHORT"); … … 711 723 writeLibDirPart(t); 712 724 t << var("QMAKE_LFLAGS") << endl; 713 t << "LIBS = " << var("QMAKE_LIBS") << endl;725 t << "LIBS = " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl; 714 726 } 715 727 } -
trunk/qmake/generators/win32/winmakefile.h
r38 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 91 91 92 92 inline bool Win32MakefileGenerator::findLibraries() 93 { return findLibraries("QMAKE_LIBS") ; }93 { return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE"); } 94 94 95 95 QT_END_NAMESPACE -
trunk/qmake/generators/xmloutput.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 278 278 { 279 279 bool cont = true; 280 if (!tagStack.contains(tag) && tag != QString()) {280 if (!tagStack.contains(tag) && !tag.isNull()) { 281 281 //warn_msg(WarnLogic, "<%s>: Cannot close to tag <%s>, not on stack", tagStack.last().latin1(), tag.latin1()); 282 282 qDebug("<%s>: Cannot close to tag <%s>, not on stack", tagStack.last().toLatin1().constData(), tag.toLatin1().constData()); -
trunk/qmake/generators/xmloutput.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the qmake application of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 **
Note:
See TracChangeset
for help on using the changeset viewer.