X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=buildtool.cpp;h=f78bf8ee87b9f6b16335b5e5978ee5421c056c6d;hb=129958c3b0e17dc15a5a4722ee83a89a780f9a57;hp=8e0fd0e9da1735b0b3946728240f5f98df2e1c59;hpb=83f36885547e2e95de03bcd66a01721633afc4ce;p=inkscape.git diff --git a/buildtool.cpp b/buildtool.cpp index 8e0fd0e9d..f78bf8ee8 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -55,19 +55,9 @@ #include - - -namespace buildtool -{ - - - -//######################################################################## -//######################################################################## -//## U T I L //######################################################################## +//# Definition of gettimeofday() for those who don't have it //######################################################################## - #ifdef __WIN32__ #include struct timezone { @@ -94,6 +84,18 @@ static int gettimeofday (struct timeval *tv, struct timezone *tz) } #endif + + + + + + +namespace buildtool +{ + + + + //######################################################################## //######################################################################## //## R E G E X P @@ -6661,6 +6663,7 @@ public: name = "msgfmt"; command = "msgfmt"; owndir = false; + outName = ""; } virtual ~TaskMsgFmt() @@ -6702,8 +6705,17 @@ public: 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)) @@ -6748,6 +6760,8 @@ public: 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)) @@ -6769,10 +6783,11 @@ public: private: - String command; - String toDirName; + String command; + String toDirName; + String outName; FileSet fileSet; - bool owndir; + bool owndir; }; @@ -7943,8 +7958,9 @@ bool Make::parsePropertyFile(const String &fileName, 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 @@ -7989,10 +8005,8 @@ bool Make::parseProperty(Element *elem) { 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::iterator iter = @@ -8206,7 +8220,7 @@ timeDiffString(struct timeval &x, struct timeval &y) 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;