ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: GCJ (GNUs Compiler for Java) with ANT
Date Fri, 01 Apr 2005 10:14:14 GMT
2) assume that its on the path (like cvs,svn,...) In a later step you could
   add a "executable" attribute.
3) <macrodef name="gcj">
       <attribute name="mainclass"/>
       <attribute name="binfile"/>
       <attribute name="jarfile"/>
       <sequential>
           <exec executable="gcj">
               <arg value="--main=@{mainclass}"/>
               <arg value="-o"/>
               <arg value="@{binfile}"/>
               <arg value="@{jarfile}"/>
           </exec>
       </sequential>
    </macrodef>

    <gcj mainclass="path.to.main.Class" binfile="YourOutputBinaryFile"
jarfile="YourJarFile.jar"/>

But you have to test :)


Jan


> -----Ursprüngliche Nachricht-----
> Von: Danilo Bürger
> [mailto:danilo.fabian.buerger@student.uni-augsburg.de]
> Gesendet am: Freitag, 1. April 2005 12:01
> An: Ant Users List
> Betreff: Re: AW: GCJ (GNUs Compiler for Java) with ANT
> 
> 0) nothing found.
> 1) gcj --main=path.to.main.Class -o YourOutputBinaryFile 
> YourJarFile.jar
> 2) I dont know how to call gcj without specifying the path to 
> it, which 
> will render that useless on multipile platforms.
> 3) No idea how to do that :P
> 4) Of course once i find out, maybe someone knows here though.
> 
> Cheers
> 
> Am 01.04.2005 um 11:56 schrieb Jan.Materne@rzf.fin-nrw.de:
> 
> > 0) do a google search ... maybe there is something on the web
> > 1) How do invoke that from command line?
> > 2) try that inside Ant with <java>/<exec>
> > 3) convert that to <presetdef>/<macrodef>
> > 4) share with us :-)
> >
> >
> > Jan
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Danilo Bürger
> >> [mailto:danilo.fabian.buerger@student.uni-augsburg.de]
> >> Gesendet am: Freitag, 1. April 2005 11:52
> >> An: Ant Users List
> >> Betreff: GCJ (GNUs Compiler for Java) with ANT
> >>
> >> Hey,
> >>
> >> i was wondering if it is possible to create an ant task so
> >> that gcj  is
> >> invoked and creates a binary file for a certain .jar file. 
> I wouldnt
> >> really want to ressort to exec task, but if there is no other
> >> way.... I
> >> also heard you can set the compiler for javac task to gcj,
> >> but that way
> >> only class files are produced not a binary.
> >>
> >> Cheers
> >>
> >> Danilo Bürger
> >>
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message