On 3/4/08, Henning Thielemann <[EMAIL PROTECTED]> wrote:
>
>
> On Tue, 4 Mar 2008, Magnus Therning wrote:
>
> > 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â  .
>
> It sounds like another instance of the case that parts of a package cannot
> be build under some circumstances. Keep in mind that other packages might
> rely on the installed second executable if they find that the package is
> installed. Thus, I guess it's better to extract the second executable to a
> different package for Window's only stuff.



Good point.  Does CABAL 1.2 have support for multiple .cabal files in the
same directory?  If not then I'm not too happy with this solution.

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

Reply via email to