I was wondering if there's any way in Ant to set an environment variable once before a series of <exec> tasks. Consider the snippet of build.xml below that is used to set the environment variable 'CL' before executing the command line compiler 'msdev.exe'. This XML works, but is an error prone maintenace headache because the nested element <env> must be repeatedly used. Is there any way around this, such that I can set the environment variable 'CL' once before multiple <exec>'s?
Ron Coutts <target name="BuildEnvironmentPkg" depends="Init" if="BuildConfig" > <exec executable="msdev.exe"> <env key="CL" value="${MsdevDefines}" /> <arg line="${basedir}/Code/EnvironmentPkg/EnvironmentPkg.dsw /MAKE 'Environment - Win32 ${BuildConfig}'" /> </exec> <exec executable="msdev.exe"> <env key="CL" value="${MsdevDefines}" /> <arg line="${basedir}/Code/EnvironmentPkg/EnvironmentPkg.dsw /MAKE 'EnvironmentAutoTest - Win32 ${BuildConfig}'" /> </exec> </target> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>