I'm putting together a package consisting of 2 executables. Only one of
them is pure Haskell and thus buildable on all platforms, the other
relies on Windows API calls and can only be built on that platform.  I
found the “if os(...)” conditional in the CABAL docs but I'm having
problems getting it to do what I want.

if os(mingw32)
  executable foo
    ...

Results in the error “Section expected”.  Swapping the two lines like this

executable foo
  if os(mingw32)
    ...

results in “Setup.hs: Error: No 'Main-Is' field found for executable foo”.

Is there a way to get CABAL to do what I want or should I raise a
feature request on the CABAL trac?

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus@therning.org             Jabber: magnus.therning@gmail.com
http://therning.org/magnus

What if I don't want to obey the laws? Do they throw me in jail with
the other bad monads?
     -- Daveman

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to