
On Sat, 2008-09-13 at 13:41 +0100, Andrew Coppin wrote:
If you mean "how do I compile the ANSI emulator on Windows but the actual ANSI stuff on Unix", most of the magic is in the .cabal file:
I simply turn on the C-preprocessor (CPP) and then supply -DWINDOWS on Windows and -DUNIX on anything else.
Anyway, that still leaves one question: how do you figure out which platform you're on so you can set the right options?
As Max suggested, look in the .cabal file. You'll find this snippet: if os(windows) Build-Depends: Win32 >= 2.0 Cpp-Options: -DWINDOWS [... other stuff ...] else -- We assume any non-Windows platform is Unix Build-Depends: unix >= 2.3.0.0 Cpp-Options: -DUNIX [... other stuff ...] Extensions: CPP Duncan