ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tawfik, Sameh E" <SamehTaw...@fairisaac.com>
Subject RE: How to escape the quotes characters in a string?
Date Tue, 08 Mar 2005 21:08:33 GMT



Hi,

Thanks to everyone, everything works fine now.

I used the following syntax:

<exec dir="C:\CVS_DB\WE" executable="NMAKE.EXE">
   <arg line="/f &quot;WE.mak&quot; CFG=&quot;WE - Win32
Release&quot;"/>
</exec>

  Sameh

-----Original Message-----
From: Nemana, Satya V [mailto:Satya.Nemana@ca.com] 
Sent: Tuesday, March 08, 2005 12:51 PM
To: Ant Users List
Subject: RE: How to escape the quotes characters in a string?

Here are some examples using quot and colon, as I used in the past,
while playing with cpptasks.jar and ant-contrib.jar to automate the
MSDEV Visua Studion .NET c++ builds using the Ant, to make it
platform-independent.

Following below constructs arguments as /YX"stdafx.h" /MACHINE:X86 etc
Note: (A) "#58;" stands for ":" and (B) "&quot;" stands for ";"

<compilerarg location="mid" value="/YX&quot;stdafx.h&quot;"
if="is-windows"/>

<compilerarg location="mid" value="/Fo&quot;${obj_type.dir}&quot;"
if="is-windows"/>

<linkerarg location="mid" value="/MACHINE&#58;X86" if="is-windows"/>


-Satya
-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
Sent: Tuesday, March 08, 2005 3:39 PM
To: Ant Users List
Subject: Re: How to escape the quotes characters in a string?

&quot;

-Matt

--- "Tawfik, Sameh E" <SamehTawfik@fairisaac.com>
wrote:
> Hi,
> 
> In my build.xml, I'm using the Ant exec task as
> follow:
> 
> <exec dir="C:\CVS_DB\WeightsEngine"
> executable="NMAKE.EXE">
>      <arg line="/f WeightsEngine.mak
> CFG="WeightsEngine -
> Win32Release""/>  
> </exec>
> 
> When I try to build, Ant reports an error regarding
> the double quotes
> that I've around WE - Win32Release
> string.
>  
> BUILD FAILED
> C:\CVS_DB\ build.xml:78: Element type "arg" must be
> followed by either
> attribute specifications, ">" or "/>".
> 
> So, does anyone know how to escape the quote
> characters in a string?
> 
> I'm using Apache Ant version 1.6.2 compiled on July
> 16 2004 on WindowXP.
> 
> I need to put quotes around the value of the above
> CFG parameters,
> otherwise the Nmake command will only see the first
> part WeigntsEgnine!
> As follow:
> 
> <exec dir="C:\CVS_DB\WE"
> executable="NMAKE.EXE">
>           <arg line="/f WE.mak
> CFG=WE -
> Win32Release"/>  </exec>
> 
> The above generates the following error:
> 
> [exec] Invalid configuration "WE"
> specified.
> [exec] You can specify a configuration when running
> NMAKE [exec] by
> defining the macro CFG on the command line. For
> example:
> [exec] NMAKE /f "WE.mak"
> CFG=3D"WE - Win32 Debug"
> 
>  Thanks,
> 
>     Sameh
> 
> 
> 
>
---------------------------------------------------------------------
> 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