1
/***************************************************************************
2
* Copyright (C) 2007 Nicolas Hadacek <hadacek@kde.org> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
8
***************************************************************************/
9
#include "mpc_compile.h"
14
#include "common/global/pfile.h"
15
#include "mpc_config.h"
16
#include "devices/list/device_list.h"
17
#include "devices/pic/base/pic.h"
19
QStringList MPC::CompileFile::genericArguments(const Compile::Config &) const
26
void MPC::CompileFile::logStderrLine(const QString &)
31
void MPC::CompileFile::parseLine(const QString &line)
33
QRegExp rexp("(\\w+)\\s+(.*)\\s+(\\d+):\\d+:(.*)");
34
if ( rexp.exactMatch(line) ) doLog(rexp.cap(1), rexp.cap(4), rexp.cap(2), rexp.cap(3).toUInt()-1);
35
else _manager->log(Log::Data, line); // unrecognized
38
void MPC::CompileFile::done(int code)
41
PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err");
42
PURL::File file(url, 0);
43
if ( !file.openForRead() ) _manager->log(Log::Error, i18n("Could not find error file (%1).").arg(url.pretty()));
45
QStringList lines = file.readLines();
46
for (uint i=0; i<lines.count(); i++) parseLine(lines[i]);
48
Compile::Process::done(code);
51
QString MPC::CompileFile::outputFiles() const
53
return "PURL::Lst PURL::Hex PURL::Cod err";