On 3/4/08, <b class="gmail_sendername">Henning Thielemann</b> <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> On Tue, 4 Mar 2008, Magnus Therning wrote:<br> <br> > I'm putting together a package consisting of 2 executables. Only one of<br> > them is pure Haskell and thus buildable on all platforms, the other<br> > relies on Windows API calls and can only be built on that platform. I<br>
<br>> found the â if os(...)â conditional in the CABAL docs but I'm having<br> <br>> problems getting it to do what I want.<br> ><br> > if os(mingw32)<br> > executable foo<br> > ...<br> ><br>
<br>> Results in the error â Section expectedâ . Swapping the two lines like this<br> <br>><br> > executable foo<br> > if os(mingw32)<br> > ...<br> ><br> <br>> results in â Setup.hs: Error: No 'Main-Is' field found for executable fooâ .<br>
<br> It sounds like another instance of the case that parts of a package cannot<br> be build under some circumstances. Keep in mind that other packages might<br> rely on the installed second executable if they find that the package is<br>
installed. Thus, I guess it's better to extract the second executable to a<br> different package for Window's only stuff.</blockquote></div><br><br>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.<br>
<br>/M<br>