You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Sven C. Koehler" <sc...@snafu.de> on 2001/09/04 01:16:16 UTC

including a file of general targets

Dear ant-users!

Being used to GNU make et al., I wonder whether it is possible to write
a build file with general targets and variable definitions, which is
included by (supposably many) other build files, that in most cases only 
select on of the already defined target and set some variables.  

Searching docs, usenet, and faq has not yet yield me fertile answers,
hence any help is greatly appreciated!

Best regards,

Sven C. Koehler

PS: I am not subscribed to this list, so please also reply to me directly.

Re: including a file of general targets

Posted by Diane Holt <ho...@yahoo.com>.
Sort of. You can have a target that references ${property}'s, then either
<antcall> or <ant> to that target, passing the property values you want.
(But it's probably not going to work exactly the way your make stuff
does.)

As for including things into build-files, see the FAQ at:
http://jakarta.apache.org/ant/faq.html#xml-entity-include

Diane

--- "Sven C. Koehler" <sc...@snafu.de> wrote:
> Dear ant-users!
> 
> Being used to GNU make et al., I wonder whether it is possible to write
> a build file with general targets and variable definitions, which is
> included by (supposably many) other build files, that in most cases only
> 
> select on of the already defined target and set some variables.  
> 
> Searching docs, usenet, and faq has not yet yield me fertile answers,
> hence any help is greatly appreciated!
> 
> Best regards,
> 
> Sven C. Koehler
> 
> PS: I am not subscribed to this list, so please also reply to me
directly.


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Re: including a file of general targets

Posted by Mikko Kurki-Suonio <ma...@davisor.com>.
On Tue, 4 Sep 2001, Sven C. Koehler wrote:

> Being used to GNU make et al., I wonder whether it is possible to write
> a build file with general targets and variable definitions, which is
> included by (supposably many) other build files, that in most cases only 
> select on of the already defined target and set some variables.  

Yes, it can be done. I've done a build system that can handle a new
project typically with just a few property files and file lists.

However, the more you want to avoid XML coding per project, the more
complex the general build file will become.

//Mikko