OSDN Git Service

2003-09-18 Dalibor Topic <robilad@kaffe.org>
[pf3gnuchains/gcc-fork.git] / libjava / gnu / java / rmi / rmic / Compile_gcj.java
index 4a35b85..ff7924e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 2001 Free Software Foundation, Inc.
+  Copyright (c) 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -40,21 +40,16 @@ package gnu.java.rmi.rmic;
 /** Subclass of Compiler that can be used to invoke gcj.  */
 public class Compile_gcj extends CompilerProcess
 {
+  private static final String [] COMPILER_ARGS = 
+  {
+    "gcj",
+    "-C"
+  };
+
   public String[] computeArguments (String filename)
   {
-    int len = 3 + (dest == null ? 0 : 2);
-    String[] result = new String[len];
-    int i = 0;
-
-    result[i++] = "gcj";
-    result[i++] = "-C";
-    if (dest != null)
-      {
-       result[i++] = "-d";
-       result[i++] = dest;
-      }
-    result[i++] = filename;
-
-    return result;
+    return computeTypicalArguments(COMPILER_ARGS,
+                                  getDestination(),
+                                  filename);
   }
 }