On 3/4/08, <b class="gmail_sendername">Henning Thielemann</b> &lt;<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>&gt; 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> &gt; I&#39;m putting together a package consisting of 2 executables. Only one of<br> &gt; them is pure Haskell and thus buildable on all platforms, the other<br> &gt; relies on Windows API calls and can only be built on that platform.&nbsp;&nbsp;I<br>
 <br>&gt; found the â&nbsp;&nbsp;if os(...)â&nbsp;&nbsp; conditional in the CABAL docs but I&#39;m having<br> <br>&gt; problems getting it to do what I want.<br> &gt;<br> &gt; if os(mingw32)<br> &gt;&nbsp;&nbsp;executable foo<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;...<br> &gt;<br>
 <br>&gt; Results in the error â&nbsp;&nbsp;Section expectedâ&nbsp;&nbsp;.&nbsp;&nbsp;Swapping the two lines like this<br> <br>&gt;<br> &gt; executable foo<br> &gt;&nbsp;&nbsp;if os(mingw32)<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;...<br> &gt;<br> <br>&gt; results in â&nbsp;&nbsp;Setup.hs: Error: No &#39;Main-Is&#39; field found for executable fooâ&nbsp;&nbsp;.<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&#39;s better to extract the second executable to a<br> different package for Window&#39;s only stuff.</blockquote></div><br><br>Good point.&nbsp; Does CABAL 1.2 have support for multiple .cabal files in the same directory?&nbsp; If not then I&#39;m not too happy with this solution.<br>
<br>/M<br>