You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Abhay Kulkarni <ab...@pune.tcs.co.in> on 2002/04/04 06:35:48 UTC
Make to Ant
i am facing the problem about the environment variables
acually i want to convert make file to xml file
the make file looks like this
DATAJAR=$(HOME)\jar\uts\Company-V1.0.jar
PERLDIR=$(BROOT)\bin
modelBasedGeneration : $(INTERNAL)\listGenerated $(INTERNAL)\queryTempGenerated $(DATAJAR) $(INTERNAL)\compMakeGenerated
$(INTERNAL)\listGenerated : $(ORIGCDF)
$(PERL) $(PERLDIR)\cdf2cdf.pl ComponentName
so i am not understanding how to set those HOME ,BROOT variables externally
or i'll have to hardcode it in every xml file
Regards,
Abhay.
Re: Make to Ant
Posted by stephan beal <st...@wanderinghorse.net>.
On Thursday 04 April 2002 06:35 am, Abhay Kulkarni wrote:
> i am facing the problem about the environment variables
> acually i want to convert make file to xml file
> the make file looks like this
>...
> so i am not understanding how to set those HOME ,BROOT variables
> externally or i'll have to hardcode it in every xml file
$(HOME) is available via a standard Java var ${user.home}.
The rest you set in your build file or a property file, or pass it in
from the command line:
Property file:
build.topdir = .
build.xml:
<property name="build.topdir" value="."/>
command line:
ant mytarget -Dbuild.topdir=.
(i think that's the syntax)
----- stephan
Generic Unix Computer Guy
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67
"...control is a degree of inhibition, and a system which is perfectly
inhibited is completely frozen." -- Alan W. Watts
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Make to Ant
Posted by Diane Holt <ho...@yahoo.com>.
--- Abhay Kulkarni <ab...@pune.tcs.co.in> wrote:
> i am facing the problem about the environment variables
>
> acually i want to convert make file to xml file
>
> the make file looks like this
>
> DATAJAR=$(HOME)\jar\uts\Company-V1.0.jar
> PERLDIR=$(BROOT)\bin
>
> so i am not understanding how to set those HOME ,BROOT variables
> externally or i'll have to hardcode it in every xml file
You can access environment variables by using:
<property environment="your_preferred_prefix"/>
This reads in all the environment variables, setting them as properties
whose names are ${your_preferred_prefix.ENV_VAR_NAME} -- eg., if
"your_preferred_prefix" is "env" (which is what most people tend to use),
after executing the <property> tag, if $HOME and $BROOT are set in the
environment, you'd reference them as the properties ${env.HOME} and
${env.BROOT}.
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>