summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ab71b4)
raw | patch | inline | side by side (parent: 9ab71b4)
author | ishmal <ishmal@users.sourceforge.net> | |
Wed, 15 Nov 2006 19:36:35 +0000 (19:36 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Wed, 15 Nov 2006 19:36:35 +0000 (19:36 +0000) |
buildtool.cpp | patch | blob | history |
diff --git a/buildtool.cpp b/buildtool.cpp
index a0f5e16303fc6f265177d3c8f519e70f2b109a89..60621478458772dd21b44585d21c6ffb827a9bf3 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
String &outbuf,
String &errbuf)
{
+
+ status("-------- cmd --------\n%s\n---------------------",
+ command.c_str());
+
#ifdef __WIN32__
bool ret = true;
cmd.append(" ");
cmd.append(fullName);
}
- //trace("AR %d: %s", fileSet.size(), cmd.c_str());
+
String outString, errString;
if (!executeCommand(cmd.c_str(), "", outString, errString))
{
cmd.append(destFullName);
//## Execute the command
- trace("cmd: %s", cmd.c_str());
+
String outString, errString;
if (!executeCommand(cmd.c_str(), "", outString, errString))
{
{
if (fileName.size()>0)
{
+ status(" : %s", fileName.c_str());
String fullSource = parent.resolve(fileName);
String fullDest = parent.resolve(toFileName);
//trace("copy %s to file %s", fullSource.c_str(),
}
if (!copyFile(fullSource, fullDest))
return false;
+ status(" : 1 file copied");
}
return true;
}
{
if (haveFileSet)
{
+ int nrFiles = 0;
+ status(" : %s", fileSetDir.c_str());
for (unsigned int i=0 ; i<fileSet.size() ; i++)
{
String fileName = fileSet[i];
}
if (!copyFile(fullSource, fullDest))
return false;
+ nrFiles++;
}
+ status(" : %d file(s) copied", nrFiles);
}
else //file source
{
//For file->dir we want only the basename of
//the source appended to the dest dir
+ status(" : %s", fileName.c_str());
String baseName = fileName;
int pos = baseName.find_last_of('/');
if (pos > 0 && pos<baseName.size()-1)
}
if (!copyFile(fullSource, fullDest))
return false;
+ status(" : 1 file copied");
}
return true;
}
{
case DEL_FILE:
{
+ status(" : %s", fileName.c_str());
String fullName = parent.resolve(fileName);
char *fname = (char *)fullName.c_str();
//does not exist
}
case DEL_DIR:
{
+ status(" : %s", dirName.c_str());
String fullDir = parent.resolve(dirName);
char *dname = (char *)fullDir.c_str();
if (!removeDirectory(fullDir))
}
//trace("LINK cmd:%s", cmd.c_str());
+
String outString, errString;
if (!executeCommand(cmd.c_str(), "", outString, errString))
{
virtual bool execute()
{
+ status(" : %s", dirName.c_str());
String fullDir = parent.resolve(dirName);
//trace("fullDir:%s", fullDir.c_str());
if (!createDirectory(fullDir))
return false;
}
+
+
String outString, errString;
if (!executeCommand(cmd.c_str(), "", outString, errString))
{
//trace("fullDir:%s", fullDir.c_str());
String cmd = "ranlib ";
cmd.append(fullName);
- trace("<ranlib> cmd:%s", cmd.c_str());
String outbuf, errbuf;
if (!executeCommand(cmd, "", outbuf, errbuf))
return false;
cmd.append(" ");
cmd.append(fullFile);
- trace("cmd: %s", cmd.c_str());
String outString, errString;
if (!executeCommand(cmd.c_str(), "", outString, errString))
{
//trace("fullDir:%s", fullDir.c_str());
String cmd = "strip ";
cmd.append(fullName);
- trace("<strip> cmd:%s", cmd.c_str());
+
String outbuf, errbuf;
if (!executeCommand(cmd, "", outbuf, errbuf))
return false;
}
}
- status("##### Target : %s", name.c_str());
+ status("## Target : %s", name.c_str());
//Now let's do the tasks
std::vector<Task *> &tasks = target.getTasks();
for (unsigned int i=0 ; i<tasks.size() ; i++)
{
Task *task = tasks[i];
- status("----- Task : %s", task->getName().c_str());
+ status("---- task : %s", task->getName().c_str());
if (!task->execute())
{
return false;