Code

Allow overriding output name for msgfmt
authorishmal <ishmal@users.sourceforge.net>
Thu, 11 Jan 2007 21:28:22 +0000 (21:28 +0000)
committerishmal <ishmal@users.sourceforge.net>
Thu, 11 Jan 2007 21:28:22 +0000 (21:28 +0000)
build.xml
buildtool.cpp

index b423e3cad5470c94ab7f91140301ddab7d20b82d..dcec565e1b06502b2d2dc1f4d0d878e8b978544e 100644 (file)
--- a/build.xml
+++ b/build.xml
   </target>
 
   <target name="i18n" depends="compile">
-    <msgfmt todir="${build}/locale" owndir="true">
+    <msgfmt todir="${build}/locale" owndir="true"
+         out="LC_MESSAGES/inkscape.mo">
           <fileset dir="po">
           </fileset>
        </msgfmt>
index 747e9577ef09d9f6b604e199ec8622d310f7b572..f78bf8ee87b9f6b16335b5e5978ee5421c056c6d 100644 (file)
@@ -6663,6 +6663,7 @@ public:
          name    = "msgfmt";
          command = "msgfmt";
          owndir  = false;
+         outName = "";
          }
 
     virtual ~TaskMsgFmt()
@@ -6704,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))
@@ -6750,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))
@@ -6771,10 +6783,11 @@ public:
 
 private:
 
-    String command;
-    String toDirName;
+    String  command;
+    String  toDirName;
+    String  outName;
     FileSet fileSet;
-    bool owndir;
+    bool    owndir;
 
 };