title: Handling nmake errorlevel/return codes
body: <p>I have an nmake-based project which in turn calls the asp compiler, which can throw an error, which nmake seems to recognize:</p>
  
  <pre><code>NMAKE : fatal error U1077: 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe' : return code '0x1'
  </code></pre>
  
  <p>However, when I call nmake from within a batch file, the environment variable %ERRORLEVEL% remains set at zero:</p>
  
  <pre><code>nmake /NOLOGO
  echo BUILD RETURNING: %ERRORLEVEL%  
  </code></pre>
  
  <p>If I control-c the nmake task, I do end up getting a non-zero ERRORLEVEL (it's set to 2) so my assumption is that I'm able to catch errors okay, but nmake isn't bubbling up the non-zero exit code from it's task.  Or, at least, I'm mis-trapping it.  Any help would be appreciated.</p>