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:[EMAIL PROTECTED]> (781) 272-3080 x242 -----Original Message----- From: Michael Wang (IT) [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]