Re: Win-GHC with GnuWin32 toolset--Mingw32 replacement

Peter Tanski <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <2E6AC5B1-8E1A-4E5F-99F8-7DA296A58064__28587.7171125778$1168198938$gmane$org@gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.