From: ishmal Date: Thu, 23 Nov 2006 22:35:43 +0000 (+0000) Subject: Allow msgfmt to create a subdir for each .mo file, such as de/de.mo X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5469721c1092af35a9250a24eaf3b637f8b96481;p=inkscape.git Allow msgfmt to create a subdir for each .mo file, such as de/de.mo --- diff --git a/build.xml b/build.xml index c890c1a7d..66ac63b92 100644 --- a/build.xml +++ b/build.xml @@ -1,6 +1,8 @@ - + - Build file for Sands office data tool + Build file for the Inkscape SVG editor. This file + was written for GTK-2.10 on Win32, but it should work + well for other types of builds with only minor adjustments. @@ -195,7 +197,7 @@ - + @@ -290,7 +292,7 @@ - + diff --git a/buildtool.cpp b/buildtool.cpp index 80c43e2c6..77527d2c3 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -6558,9 +6558,10 @@ public: TaskMsgFmt(MakeBase &par) : Task(par) { - type = TASK_MSGFMT; - name = "msgfmt"; + type = TASK_MSGFMT; + name = "msgfmt"; command = "msgfmt"; + owndir = false; } virtual ~TaskMsgFmt() @@ -6593,6 +6594,15 @@ public: destPath.append(toDirName); destPath.append("/"); } + if (owndir) + { + String subdir = fileName; + unsigned int pos = subdir.find_last_of('.'); + if (pos != subdir.npos) + subdir = subdir.substr(0, pos); + destPath.append(subdir); + destPath.append("/"); + } destPath.append(fileName); destPath[destPath.size()-2] = 'm'; String fullDest = parent.resolve(destPath); @@ -6634,6 +6644,11 @@ public: { if (!parent.getAttribute(elem, "todir", toDirName)) return false; + String s; + if (!parent.getAttribute(elem, "owndir", s)) + return false; + if (!getBool(s, owndir)) + return false; std::vector children = elem->getChildren(); for (unsigned int i=0 ; i