logo       

Re: Changes to make fptools insfrastructure usable for standalone librar: msg#00019

lang.haskell.glasgow.bugs

Subject: Re: Changes to make fptools insfrastructure usable for standalone libraries

On Sat, May 17, 2003 at 05:21:17PM +0100, Alastair Reid wrote:
> [...]
> When using greencard we need to know where the Foreign.GreenCard.gc
> file was installed. The best place seems to be in the same place that
> Foreign.GreenCard.hi is installed. This requires this definition:
>
> GHC_INSTALL_LIBDIR=`$(TOP)/find-ghc-libdir`
>
> where find-ghc-libdir is a cunning script from the Hopengl distribution
> that figures out where ghc looks for installed packages. (I think there is
> now a cleaner way of figuring this out but can't remember it.)

How about SimonM's suggestion:
> We've solved this problem several times (GHC, hsc2hs, Happy, Alex,
> Haddock). The solution I normally use for Unix systems is to have a
> small script which invokes the main binary passing it a flag which
> indicates the location of its auxiliary files (usually something like
> /usr/local/lib/happy). You can build a location-independent binary
> package which just fiddles with this script at install time. On
> Windows, it's rather easier because a binary can get at its own
> filesystem location at runtime.

i.e. putting Foreign/GreenCard.gc and the green-card binary under
$(libdir)/gc-3.00 and making $(bindir)/green-card a small script that
runs the binary with an appropriate -i flag. That would also avoid an
entanglement with GHC.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise