ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Ji" <...@pro-unlimited.com>
Subject Help with this build.xml
Date Fri, 30 Jun 2006 18:17:08 GMT

Question: 
I want to put some files in a fileset, so that I can build them one by one, such as 
<fileset dir="src.dir">
   <patternset id="compile.dir"> 
	<include name="com/supplier/domain">
	<include name="com/supplier/dao">
	<include name="com/manager/domain">
	<include name="com/manager/dao">
	...
</fileset> 

but somehow in ant, "Javac" does not acccept this "<fileset>", do you know a way to
work arond. 
 


cj 


-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com]
Sent: Friday, June 30, 2006 6:48 AM
To: Ant Users List; jim.fuller@ruminate.co.uk
Subject: Re: help to compile c / c++ files in ant
Importance: Low


Nice. You can also make cc-elements implicit, so that you don't have
to specify it when using <call-cc>. --DD

On 6/30/06, James Fuller <jim.fuller@ruminate.co.uk> wrote:
> Here is a nice illustration in context of using cc with macrodef.
>
> http://ant.apache.org/manual/CoreTasks/macrodef.html
>
>
> definition:
>     <macrodef name="call-cc">
>        <attribute name="target"/>
>        <attribute name="link"/>
>        <attribute name="target.dir"/>
>        <element name="cc-elements"/>
>        <sequential>
>           <mkdir dir="${obj.dir}/@{target}"/>
>           <mkdir dir="@{target.dir}"/>
>              <cc link="@{link}" objdir="${obj.dir}/@{target}"
>                  outfile="@{target.dir}/@{target}">
>                 <compiler refid="compiler.options"/>
>                 <cc-elements/>
>              </cc>
>           </sequential>
>     </macrodef>
>
>
> usage:
>
>     <call-cc target="unittests" link="executable"
>              target.dir="${build.bin.dir}">
>        <cc-elements>
>           <includepath location="${gen.dir}"/>
>           <includepath location="test"/>
>           <fileset dir="test/unittest" includes = "**/*.cpp"/>
>           <fileset dir="${gen.dir}" includes = "*.cpp"/>
>           <linker refid="linker-libs"/>
>        </cc-elements>
>     </call-cc>
>
> gl, Jim Fuller
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message