aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/processcommandexecutor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/buildgraph/processcommandexecutor.cpp')
-rw-r--r--src/lib/corelib/buildgraph/processcommandexecutor.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/processcommandexecutor.cpp b/src/lib/corelib/buildgraph/processcommandexecutor.cpp
index 3efcc2653..25a80f5be 100644
--- a/src/lib/corelib/buildgraph/processcommandexecutor.cpp
+++ b/src/lib/corelib/buildgraph/processcommandexecutor.cpp
@@ -144,7 +144,18 @@ void ProcessCommandExecutor::doStart()
return;
}
for (int i = cmd->responseFileArgumentIndex(); i < cmd->arguments().count(); ++i) {
- responseFile.write(qbs::Internal::shellQuote(cmd->arguments().at(i)).toLocal8Bit());
+ const QString arg = cmd->arguments().at(i);
+ if (arg.startsWith(cmd->responseFileUsagePrefix())) {
+ QFile f(arg.mid(cmd->responseFileUsagePrefix().count()));
+ if (!f.open(QIODevice::ReadOnly)) {
+ emit finished(ErrorInfo(Tr::tr("Cannot open command file '%1'.")
+ .arg(QDir::toNativeSeparators(f.fileName()))));
+ return;
+ }
+ responseFile.write(f.readAll());
+ } else {
+ responseFile.write(qbs::Internal::shellQuote(arg).toLocal8Bit());
+ }
responseFile.write("\n");
}
responseFile.close();