--- a/qmake/project.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/qmake/project.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -671,6 +671,7 @@
scope_blocks.push(ScopeBlock());
iterator = 0;
function = 0;
+ backslashWarned = false;
}
bool
@@ -1046,7 +1047,7 @@
SKIP_WS(d, d_off, s.length());
QString vals = s.mid(d_off); // vals now contains the space separated list of values
int rbraces = vals.count('}'), lbraces = vals.count('{');
- if(scope_blocks.count() > 1 && rbraces - lbraces == 1) {
+ if(scope_blocks.count() > 1 && rbraces - lbraces == 1 && vals.endsWith('}')) {
debug_msg(1, "Project Parser: %s:%d : Leaving block %d", parser.file.toLatin1().constData(),
parser.line_no, scope_blocks.count());
ScopeBlock sb = scope_blocks.pop();
@@ -1073,7 +1074,7 @@
}
if(vals.contains('=') && numLines > 1)
- warn_msg(WarnParser, "Detected possible line continuation: {%s} %s:%d",
+ warn_msg(WarnParser, "Possible accidental line continuation: {%s} at %s:%d",
var.toLatin1().constData(), parser.file.toLatin1().constData(), parser.line_no);
QStringList &varlist = place[var]; // varlist is the list in the symbol table
@@ -1405,16 +1406,6 @@
return false;
}
- if(cmd & ReadPostFiles) { // parse post files
- const QStringList l = vars["QMAKE_POST_INCLUDE_FILES"];
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
- if(read((*it), vars)) {
- if(vars["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf((*it)) == -1)
- vars["QMAKE_INTERNAL_INCLUDED_FILES"].append((*it));
- }
- }
- }
-
if(cmd & ReadCmdLine) {
parser.file = "(internal)";
parser.from_file = false;
@@ -1719,7 +1710,6 @@
fprintf(stderr, "Cannot find directory: %s\n", file.left(di).toLatin1().constData());
return IncludeFailure;
}
- file = file.right(file.length() - di - 1);
}
bool parsed = false;
parser_info pi = parser;
@@ -1739,9 +1729,9 @@
if(proj.doProjectInclude("default_pre", IncludeFlagFeature, proj.variables()) == IncludeNoExist)
proj.doProjectInclude("default", IncludeFlagFeature, proj.variables());
#endif
- parsed = proj.read(file, proj.variables());
+ parsed = proj.read(file, proj.variables()); // parse just that file (fromfile, infile)
} else {
- parsed = proj.read(file);
+ parsed = proj.read(file); // parse all aux files (load/include into)
}
place = proj.variables();
} else {
@@ -2190,7 +2180,7 @@
if(args.count() != 1) {
fprintf(stderr, "%s:%d prompt(question) requires one argument.\n",
parser.file.toLatin1().constData(), parser.line_no);
- } else if(projectFile() == "-") {
+ } else if(pfile == "-") {
fprintf(stderr, "%s:%d prompt(question) cannot be used when '-o -' is used.\n",
parser.file.toLatin1().constData(), parser.line_no);
} else {
@@ -2933,6 +2923,11 @@
break;
}
}
+ if(!escape && !backslashWarned) {
+ backslashWarned = true;
+ warn_msg(WarnDeprecated, "%s:%d: Unescaped backslashes are deprecated.",
+ parser.file.toLatin1().constData(), parser.line_no);
+ }
if(escape || !replaced)
unicode =0;
} else if(!quote && (unicode == SINGLEQUOTE || unicode == DOUBLEQUOTE)) {
@@ -3099,13 +3094,12 @@
place[var] = QStringList(Option::obj_ext);
}
} else if (var == QLatin1String("QMAKE_QMAKE")) {
- if (place[var].isEmpty()) {
- if (!Option::qmake_abslocation.isNull())
- place[var] = QStringList(Option::qmake_abslocation);
- else
- place[var] = QStringList(Option::fixPathToTargetOS(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake", false));
- }
+ if (place[var].isEmpty())
+ place[var] = QStringList(Option::fixPathToTargetOS(
+ !Option::qmake_abslocation.isEmpty()
+ ? Option::qmake_abslocation
+ : QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake",
+ false));
} else if (var == QLatin1String("EPOCROOT")) {
if (place[var].isEmpty())
place[var] = QStringList(epocRoot());