You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/10/22 20:53:25 UTC

svn commit: r587192 - in /activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool: AmqCppClassesGenerator.java AmqCppGeneratorTask.java AmqCppMarshallingHeadersGenerator.java AmqCppTestMarshallingHeadersGenerator.java

Author: tabish
Date: Mon Oct 22 11:53:25 2007
New Revision: 587192

URL: http://svn.apache.org/viewvc?rev=587192&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-142

Adding in the ability to generate the makefiles for each of the gerneated targets.

Modified:
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java?rev=587192&r1=587191&r2=587192&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java Mon Oct 22 11:53:25 2007
@@ -21,6 +21,7 @@
 import java.io.PrintWriter;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ArrayList;
 
 import org.codehaus.jam.JClass;
 import org.codehaus.jam.JProperty;
@@ -32,6 +33,17 @@
 public class AmqCppClassesGenerator extends MultiSourceGenerator {
 
     protected String targetDir="./src/main";
+    protected ArrayList<String> filesProcessed = new ArrayList<String>();
+
+    protected void processClass(JClass jclass) {
+
+        super.processClass( jclass );
+        filesProcessed.add( getClassName() + getFilePostFix() );
+    }
+
+    public ArrayList<String> getFilesProcessed() {
+        return filesProcessed;
+    }
 
     public Object run() {
         filePostFix = getFilePostFix();

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java?rev=587192&r1=587191&r2=587192&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java (original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java Mon Oct 22 11:53:25 2007
@@ -18,6 +18,7 @@
 package org.apache.activemq.openwire.tool;
 
 import java.io.File;
+import java.util.ArrayList;
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
@@ -74,33 +75,44 @@
             params.includeSourcePattern(dirs, "**/*.java");
             JamService jam = jamServiceFactory.createService(params);
 
+            ArrayList<String> commandsHeaders = null;
+            ArrayList<String> commandsSources = null;
+            ArrayList<String> marshalingHeaders = null;
+            ArrayList<String> marshalingSources = null;
+            ArrayList<String> marshalingTestsHeaders = null;
+            ArrayList<String> marshalingTestsSources = null;
+
             {
                 AmqCppClassesGenerator script = new AmqCppClassesGenerator();
                 script.setJam(jam);
                 script.setTargetDir(target+"/src/main");
                 script.setOpenwireVersion(version);
-//                script.run();
+                script.run();
+                commandsSources = script.getFilesProcessed();
             }
             {
                 AmqCppHeadersGenerator script = new AmqCppHeadersGenerator();
                 script.setJam(jam);
                 script.setTargetDir(target+"/src/main");
                 script.setOpenwireVersion(version);
-//                script.run();
+                script.run();
+                commandsHeaders = script.getFilesProcessed();
             }
             {
                 AmqCppMarshallingHeadersGenerator script = new AmqCppMarshallingHeadersGenerator();
                 script.setJam(jam);
                 script.setTargetDir(target+"/src/main");
                 script.setOpenwireVersion(version);
-//                script.run();
+                script.run();
+                marshalingHeaders = script.getFilesProcessed();
             }
             {
                 AmqCppMarshallingClassesGenerator script = new AmqCppMarshallingClassesGenerator();
                 script.setJam(jam);
                 script.setTargetDir(target+"/src/main");
                 script.setOpenwireVersion(version);
-//                script.run();
+                script.run();
+                marshalingSources = script.getFilesProcessed();
             }
             {
                 AmqCppTestMarshallingHeadersGenerator script = new AmqCppTestMarshallingHeadersGenerator();
@@ -108,6 +120,7 @@
                 script.setTargetDir(target+"/src/test");
                 script.setOpenwireVersion(version);
                 script.run();
+                marshalingTestsHeaders = script.getFilesProcessed();
             }
             {
                 AmqCppTestMarshallingClassesGenerator script = new AmqCppTestMarshallingClassesGenerator();
@@ -115,8 +128,8 @@
                 script.setTargetDir(target+"/src/test");
                 script.setOpenwireVersion(version);
                 script.run();
+                marshalingTestsSources = script.getFilesProcessed();
             }
-
 
         } catch (Exception e) {
             throw new BuildException(e);

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java?rev=587192&r1=587191&r2=587192&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java (original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java Mon Oct 22 11:53:25 2007
@@ -19,6 +19,7 @@
 
 import java.io.File;
 import java.io.PrintWriter;
+import java.util.ArrayList;
 
 import org.codehaus.jam.JClass;
 
@@ -29,6 +30,7 @@
 public class AmqCppMarshallingHeadersGenerator extends JavaMarshallingGenerator {
 
     protected String targetDir="./src/main";
+    protected ArrayList<String> filesProcessed = new ArrayList<String>();
 
     public Object run() {
         filePostFix = getFilePostFix();
@@ -36,6 +38,16 @@
             destDir = new File(targetDir+"/activemq/connector/openwire/marshal/v"+getOpenwireVersion());
         }
         return super.run();
+    }
+
+    protected void processClass(JClass jclass) {
+
+        super.processClass( jclass );
+        filesProcessed.add( getClassName() + getFilePostFix() );
+    }
+
+    public ArrayList<String> getFilesProcessed() {
+        return filesProcessed;
     }
 
     protected String getBaseClassName(JClass jclass) {

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java?rev=587192&r1=587191&r2=587192&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java (original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java Mon Oct 22 11:53:25 2007
@@ -19,6 +19,7 @@
 
 import java.io.File;
 import java.io.PrintWriter;
+import java.util.ArrayList;
 
 import org.codehaus.jam.JClass;
 
@@ -29,6 +30,7 @@
 public class AmqCppTestMarshallingHeadersGenerator extends JavaMarshallingGenerator {
 
     protected String targetDir="./src/main";
+    protected ArrayList<String> filesProcessed = new ArrayList<String>();
 
     protected void processClass(JClass jclass) {
 
@@ -37,6 +39,8 @@
         }
 
         super.processClass( jclass );
+
+        filesProcessed.add( getClassName() + getFilePostFix() );
     }
 
     public Object run() {
@@ -46,6 +50,10 @@
             destDir = new File(targetDir+"/activemq/connector/openwire/marshal/v"+getOpenwireVersion());
         }
         return super.run();
+    }
+
+    public ArrayList<String> getFilesProcessed() {
+        return filesProcessed;
     }
 
     protected String getClassName(JClass jclass) {