[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell
Subject:    [Haskell] Re: Cabal and dynamically generated files
From:       Simon Marlow <simonmarhaskell () gmail ! com>
Date:       2006-05-26 10:28:11
Message-ID: 4476D83B.1020402 () microsoft ! com
[Download RAW message or body]

David House wrote:

> In order to compile the Main.hs for my program, you first need to
> compile the BuildMain.hs, then run it (it will create a Main.hs). This
> is easy with Makefiles, however, I'd quite like to use Cabal for its
> Windows support and dependency handling.
> 
> This might not be easy, but could it be done? How would I go about it?

It's certainly possible, but maybe not easy.  You'll have to provide a 
pre-build hook in your Setup.lhs script that builds and runs 
BuildMain.hs.  The problem is that the Cabal libraries don't provide a 
compiler-independent way to compile a haskell module, so you'll have to 
construct the command line and run it by hand, which means you'll 
probably end up being dependent on GHC.

Ideally we should have this functionality in Cabal.  If you felt like 
adding it, that would be great.

Cheers,
	Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic