proper cabal use?
duncan.coutts at worc.ox.ac.uk
Mon Apr 28 19:24:13 EDT 2008
On Mon, 2008-04-28 at 11:50 -0300, Daniel Gorín wrote:
> In the hint  package I need to run
> ghc --print-libdir
> at configure time and save its result. The catch is that I need to
> run exactly the same ghc binary that will build the package (i.e. not
> necessarily the one in the path).
> Because of this requirement I can't use a "configure" script as
> advised in the docs , can I?
> What I did, instead, is to write a posthook that takes the
> information in the LocalBuildInfo and runs the ghc configured there.
> The downside is that this it is not portable across Cabal versions
> (incidentally, if I add the requirement cabal-version: >= 1.2 && <
> 1.3, hackage refuses to upload the package...)
Ah, that's not good. We'll have to look into that.
> So my question is, what would be the proper way to handle this?
Using the custom Setup.hs seems unavoidable.
More information about the Libraries