diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-11-23 22:35:43 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-11-23 22:35:43 +0000 |
| commit | 8d4142f6c41307e76ab262cea9aa9ec6a9a1a214 (patch) | |
| tree | d78cde0ee84d61bb87c766ba09a36049ad48cbdf /buildtool.cpp | |
| parent | a couple more static libs (diff) | |
| download | inkscape-8d4142f6c41307e76ab262cea9aa9ec6a9a1a214.tar.gz inkscape-8d4142f6c41307e76ab262cea9aa9ec6a9a1a214.zip | |
Allow msgfmt to create a subdir for each .mo file, such as de/de.mo
(bzr r2015)
Diffstat (limited to 'buildtool.cpp')
| -rw-r--r-- | buildtool.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
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<Element *> children = elem->getChildren(); for (unsigned int i=0 ; i<children.size() ; i++) @@ -6654,6 +6669,7 @@ private: String command; String toDirName; FileSet fileSet; + bool owndir; }; |
