Win-GHC with GnuWin32 toolset--Mingw32 replacement

Peter Tanski p.tanski at gmail.com
Sun Jan 7 14:41:41 EST 2007


On Jan 7, 2007, at 2:14 PM, Neil Mitchell wrote:
> Those were merely our thoughts on how to do it, alas we haven't had
> the time yet to get anything implemented. The old makefile for Windows
> was written in .bat and that did the vsvars trick, hardcoded to look
> at various VSnn combinations, in order of most recent to oldest.

Ah.  Nothing like a little exploration :)  Does ./build/platform.py  
sound like the right place to do it?  I was looking into this because  
it is a user-convenience (or well-designed build system) issue.  In  
ghc's case I need to ensure the build environment is correct using a  
configure script; I also wanted to try adding a bootstrap-build of  
ghc-stage1 using yhc since without -fvia-C I don't think Win-GHC can  
bootstrap from .hc files or unregisterised.

>> Because each system runs under its own command environment, I would
>> guess.  (I am guessing that, if you are using SCons, you already
>> tried propagating the resulting external environment to the ENV.)
>
> I think these experiments might have been pre-scons, I'm not sure if
> we've tried it seriously since then.

It might be harder in Scons if you need to define more Scons- 
environment variables than 'path'.

>> You shouldn't even have to parse the file much: each @set command is
>> located on one line, for example:
>>
>> @set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%
>> VCINSTALLDIR%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%
>>
>> so just grab the line and execute (as a shell command), right?
>
> Yes, that should be sufficient. Batch files can have goto's which
> constitute structure, but I can't remember if any of the vsvars files
> I looked up had any goto's in them.

The vcvarsall.bat in the \Visual Studio X\VC\ directory has goto's  
that essentially redirect to the \Visual Studio X\Common7\Tools 
\vsvars32.bat; my vsvars32.bat doesn't have any goto's in it.

Cheers,
Pete




More information about the Cvs-ghc mailing list