ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Genter" <rgen...@silverlink.com>
Subject RE: Trick to Run Exec Task with Dir set
Date Thu, 17 Feb 2005 19:53:39 GMT
Use <arg line="..."> instead of <arg value="...">. Value specifies a
single command line argument; line specifies all of the command line
arguments. 


--
Rick Genter
Principal Engineer
Silverlink Communications
<mailto:rgenter@silverlink.com>
(781) 272-3080 x242



-----Original Message-----
From: Michael Wang (IT) [mailto:MWANG@bordersgroupinc.com] 
Sent: Thursday, February 17, 2005 2:51 PM
To: Ant Users List
Subject: Trick to Run Exec Task with Dir set
Importance: High

Hi,

I have the following ant script.


	<target ...>
		<foreach target="_call.batch.proc.make_"
param="proc.file">
			<param name="makefile.mk" value="mymakefile"/>
			<path>
				<fileset id="proc.retek.file"
dir="${source.dir}">
					<include name="*.pc"/>
				</fileset>		    
			</path>
		</foreach>
	</target>

	<target name="_call.batch.proc.make_">
		<basename property="module.name" file="${proc.file}"
suffix=".pc"/>
		<dirname property="directory.name" file="${proc.file}"/>
		<exec executable="make" dir="${directory.name}"
failonerror="true">
			<arg value="-f ${makefile.mk} ${module.name}"/>
		</exec>
	</target>
	

I have to run "make" under ${directory.name} in order to get the code
compiled.

for example, if I have the following files under ${directory.name}

	a.pc
	b.pc
	c.pc

I have to cd to that directory, and run

	make -f mymakefile a
	make -f mymakefile b
	make -f mymakefile c

Now, I keep getting error like "make: 1254-027 Cannot open mymakefile
a.". I verified under ${directory_name}, the file mymakefile is there.

Any idea? Thanks.

Mike

---------------------------------------------------------------------
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