Strengthen check for combined QMAKE_EXTRA_COMPILER with variable output
The pattern ${QMAKE_ needs to be at the beginning of the line, or not start with a $ (which would make it a regular qmake variable). Also, it's fine that the variable is of the QMAKE_VAR_foo type, as these variables are resolved at generator time, but are constant and do not depend on the inputs. This means we have to replace extra variables in the output. Change-Id: I21ad24ae770f2137e2d5d92a20ee54e2f3f4ca06 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
9c6a4c1a37
commit
15e9c3301c
@ -1955,7 +1955,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
}
|
||||
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
|
||||
if (config.indexOf("combine") != -1) {
|
||||
if(tmp_out.indexOf("${QMAKE_") != -1) {
|
||||
if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) {
|
||||
warn_msg(WarnLogic, "QMAKE_EXTRA_COMPILERS(%s) with combine has variable output.",
|
||||
(*it).toLatin1().constData());
|
||||
continue;
|
||||
@ -2031,8 +2031,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
if (inputs.isEmpty())
|
||||
continue;
|
||||
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out));
|
||||
t << escapeDependencyPath(tmp_out) << ":";
|
||||
QString out = replaceExtraCompilerVariables(tmp_out, QString(), QString());
|
||||
QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList() << out);
|
||||
t << escapeDependencyPath(out) << ":";
|
||||
// compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies
|
||||
if (config.indexOf("explicit_dependencies") != -1) {
|
||||
t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir)));
|
||||
|
Loading…
Reference in New Issue
Block a user