Haddock version during build

Simon Marlow marlowsd at gmail.com
Tue Jun 17 05:58:23 EDT 2008


Ian Lynagh wrote:

>> Perhaps we should have a general solution to this? 
>>  I'm open to suggestions.  Here's one: when installing a GHC distribution 
>> we create a tiny library called libghc-defaults.a that exports a single 
>> symbol
>>
>>   char *ghc_default_libdir="/usr/lib/ghc-6.10/or/whatever"
>>
>> and we always add libghc-defaults.a when linking the GHC package.
> 
> We could instead have Cabal generate
> 
>     ghcLibdir :: Maybe FilePath -- Nothing if compiler /= GHC
>     ghcLibDir = Just "<what $GHC --print-libdir says>"
> 
> in Paths_$package.

Yes, that would work, and is simpler to implement.  However, for Haddock 
we'd still need a wrapper script so that we can have position-independent 
binary distributions (or don't ship Haddock :-).

Cheers,
	Simon


More information about the Cvs-libraries mailing list