ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: if, unless problems
Date Fri, 08 Dec 2000 23:48:58 GMT
At 08:33  8/12/00 +0300, Alexander V. Gorlov wrote:
>Peter Donald <donaldp@apache.org>
>>>What can I do if I want compile not all modules from project?
>>>Sorry, but when I build apache  server i may select modules for
>>compilation and in the ant this feature is not supported :(
>>
>>I have no idea what your problem is because everything available by
>>property expansion is available through other methods...
>>
>
>Peter, can you give me some exaples of other methods? Please.

Sure tell us specifically your problems. What a lot of people tend to do is
create a template file. This template file may use properties a, b and c to
d o build. This is useful if you need to repeat the same process on
multiple different files etc.

You then use ant task to "call" the template file supplied with appropriate
parameters. For each different set of files it needs to operate on.

Alternatively you can do something like the following. Asusme target "a" is
one module and target "b" is another module. They will only be compiled if
you set the appropriate properties.

<target name="a" if="compile.a">
</target>

<target name="b" depend="a" if="compile.b">
</target>

<target name="main" depend="b">
</target>

Another option is to use the approach ant uses. Look how they use

<exclude "**/blah/*" unless="compile.blah" />

I can't really say exactly what to do because you haven't said what you
need it for ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message