You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/11/02 22:13:10 UTC

cvs commit: jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers LibtoolCompiler.java LibtoolLinker.java

costin      01/11/02 13:13:10

  Modified:    jk/jkant ant.tasks
               jk/jkant/java/org/apache/jk/ant SoTask.java
               jk/jkant/java/org/apache/jk/ant/compilers
                        LibtoolCompiler.java LibtoolLinker.java
  Log:
  Add a small option to allow profiling ( assuming libtool, gcc, etc ).
  
  ( still investigating how to do a configure on Apache/APR with profiling )
  
  Let the fun begin !
  
  Revision  Changes    Path
  1.3       +3 -2      jakarta-tomcat-connectors/jk/jkant/ant.tasks
  
  Index: ant.tasks
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/jkant/ant.tasks,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ant.tasks	2001/10/26 19:53:45	1.2
  +++ ant.tasks	2001/11/02 21:13:10	1.3
  @@ -1,2 +1,3 @@
  -apxs=org.apache.jk.ant.ApxsTask
  -so=org.apache.jk.ant.SoTask
  \ No newline at end of file
  +so=org.apache.jk.ant.SoTask
  +libtoolCompile=org.apache.jk.ant.compilers.LibtoolCompiler
  +ccCompile=org.apache.jk.ant.compilers.CcCompiler
  
  
  
  1.9       +19 -2     jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/SoTask.java
  
  Index: SoTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/SoTask.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SoTask.java	2001/11/02 20:29:54	1.8
  +++ SoTask.java	2001/11/02 21:13:10	1.9
  @@ -111,6 +111,7 @@
   
       protected boolean optG=true;
       protected boolean optimize=false;
  +    protected boolean profile=false;
       protected Vector defines = new Vector();
   
       // Computed fields 
  @@ -141,11 +142,14 @@
   	so.debug=debug;
   	so.optG=optG;
   	so.optimize=optimize;
  +	so.profile=profile;
   	so.defines=defines;
   	so.srcList=srcList;
   	so.compileList=compileList;
       }
  -    
  +
  +    /**  @deprecated use setTarget
  +     */
       public void setSoFile(String s ) {
   	soFile=s;
       }
  @@ -162,17 +166,30 @@
   	optimize=b;
       }
   
  +    /** Add profiling information
  +     */
  +    public void setProfile(boolean b) {
  +	profile=b;
  +    }
  +
       /** Debug the <so> task
        */
       public void setTaskDebug(int i) {
   	debug=i;
       }
   
  +    /** Add a -D option. Note that each define has
  +     *  an if/unless attribute
  +     */ 
       public void addDef(Def var ) {
   	var.setProject( project );
   	defines.addElement(var);
       }
  -    
  +
  +    /** Set the target for this compilation. Don't include any
  +     *  directory or suffix ( not sure about prefix - we may want
  +     *  to add lib automatically for unix, and nothing on win/etc ?  ).
  +     */
       public void setTarget(String s ) {
   	soFile=s;
       }
  
  
  
  1.2       +3 -0      jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/LibtoolCompiler.java
  
  Index: LibtoolCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/LibtoolCompiler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LibtoolCompiler.java	2001/11/02 20:25:09	1.1
  +++ LibtoolCompiler.java	2001/11/02 21:13:10	1.2
  @@ -177,6 +177,9 @@
   	if( optimize )
   	    cmd.createArgument().setValue("-O2" );
   	
  +	if( profile )
  +	    cmd.createArgument().setValue("-pg" );
  +	
   	if( localCflags != null )
   	    cmd.createArgument().setLine( localCflags );
   
  
  
  
  1.2       +3 -0      jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/LibtoolLinker.java
  
  Index: LibtoolLinker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/LibtoolLinker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LibtoolLinker.java	2001/11/02 20:25:09	1.1
  +++ LibtoolLinker.java	2001/11/02 21:13:10	1.2
  @@ -111,6 +111,9 @@
   	cmd.createArgument().setValue( "-o" );
   	cmd.createArgument().setValue( soFile + ".la" );
   
  +	if( profile )
  +	    cmd.createArgument().setValue("-pg" );
  +
   	// All .o files must be included
   	project.log( "Linking " + buildDir + "/" + soFile + ".so");
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>