Hey Fritz, thanks for the reply!

 

I am not an expert user either, even if I knew how to convert the make to Nant, I am using a third party SDK and we don’t want to modify anything, or at least convert every time they release a new SDK. So I am still left with the same dilemma.

 

Regardless of using make.exe, (maybe I should have used a different example) I am still quite perplexed on why the environment variables are not being set.

 

 

Shawn Haigh


 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 12:40 PM
To: Shawn Haigh
Subject: Re: [Nant-users] Problem with passing Environment Variables to the Exec task.

 


This does not address your particular problem of passing environment variables; I have only been following the thread and I am not an expert user.
However, I see you executing "make.exe" within a NAnt. It seems like an oximoron as NNant server as the Make. So I would look at your makefile and convert it to a NAnt script. You may end up with a simplified make environment.


"Shawn Haigh" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

10/25/2004 09:13 AM

To

[EMAIL PROTECTED]

cc

 

Subject

[Nant-users] Problem with passing Environment Variables to the Exec task.

 

 

 




Greetings all
 
I am having a problem with passing environment variables to an exec task. Basically I am trying to convert what we do using regular .bat files to a NAnt equivalent.
 
I am using a nightly build of NAnt v0.85-20041006
Platform: Win2000 server sp4
 
 Here is an example of what I am using. All properties are set in a global context.
 
<property name="gnupath" value="d:\apps\cygwin\bin" />
.
.
.
 
<exec program="make.exe" basedir="${gnupath}" workingdir="${make.working.dir}/" >
<arg line="${make.cmd}" />
<environment>
<option name="ROOT_DRIVE" value="${apps.drive}" />
<option name="APPS_DIR" value="${apps.dir}" />
<option name="APPS_PATH" value="${apps.path}" />
<option name="UTILROOT" value="${utilpath}" />
.
.
</environment>
</exec>
 
After running the above, compilation fails. To troubleshoot I ran “set” from the command line to see if the environment variables have actually been set, they are not.. So I assume NAnt passes the environment for the instance of the exec task. To verify this I ran the .bat file from an exec task without the nested <environment> task
 
For example:  <exec program="mybatfile.bat" />
 
and included the environment variables within the batch file. i.e. “set GNUPATH=%APPS_PATH%\cygwin\bin” etc…
 
Compilation still fails, so verified the environment variables again using “set”… to my surprise GNUPATH is still not set in the environment. ???
 
I verified my bat file and it works fine if I don’t use NAnt. Could this be a bug or am I doing something wrong using in my Nant configuration?
 
 
 
Shawn Haigh

 



 

Reply via email to