diff --git a/buildtool.cpp b/buildtool.cpp
index 8e0fd0e9da1735b0b3946728240f5f98df2e1c59..f78bf8ee87b9f6b16335b5e5978ee5421c056c6d 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
#include <errno.h>
-
-
-namespace buildtool
-{
-
-
-
-//########################################################################
-//########################################################################
-//## U T I L
//########################################################################
+//# Definition of gettimeofday() for those who don't have it
//########################################################################
-
#ifdef __WIN32__
#include <sys/timeb.h>
struct timezone {
}
#endif
+
+
+
+
+
+
+namespace buildtool
+{
+
+
+
+
//########################################################################
//########################################################################
//## R E G E X P
name = "msgfmt";
command = "msgfmt";
owndir = false;
+ outName = "";
}
virtual ~TaskMsgFmt()
destPath.append(subdir);
destPath.append("/");
}
- destPath.append(fileName);
- destPath[destPath.size()-2] = 'm';
+ //Pick the output file name
+ if (outName.size() > 0)
+ {
+ destPath.append(outName);
+ }
+ else
+ {
+ destPath.append(fileName);
+ destPath[destPath.size()-2] = 'm';
+ }
+
String fullDest = parent.resolve(destPath);
if (!isNewerThan(fullSource, fullDest))
command = s;
if (!parent.getAttribute(elem, "todir", toDirName))
return false;
+ if (!parent.getAttribute(elem, "out", outName))
+ return false;
if (!parent.getAttribute(elem, "owndir", s))
return false;
if (!getBool(s, owndir))
private:
- String command;
- String toDirName;
+ String command;
+ String toDirName;
+ String outName;
FileSet fileSet;
- bool owndir;
+ bool owndir;
};
return false;
}
val = s.substr(p);
- if (key.size()==0 || val.size()==0)
+ if (key.size()==0)
continue;
+ //allow property to be set, even if val=""
//trace("key:'%s' val:'%s'", key.c_str(), val.c_str());
//See if we wanted to overload this property
{
if (!getAttribute(elem, "location", val))
return false;
- if (val.size() > 0)
- {
- properties[attrVal] = val;
- }
+ //let the property exist, even if not defined
+ properties[attrVal] = val;
}
//See if we wanted to overload this property
std::map<String, String>::iterator iter =
int millis = (int)((microsX - microsY)/1000);
int minutes = seconds/60;
- seconds += minutes*60;
+ seconds -= minutes*60;
char buf[80];
snprintf(buf, 79, "%dm %d.%03ds", minutes, seconds, millis);
String ret = buf;