cabal install doesn't use PATH

Isaac Jones ijones at syntaxpolice.org
Wed Jul 26 12:25:49 EDT 2006


CCing Ian, since I seem to remember that he hacked on the makefile.

Frederik Eaton <frederik at a5.repetae.net> writes:

> Hi,
>
> What's the reason for not resolving executables through PATH in the
> cabal Makefile?

No particularly good reason, afaik.

> $ pwd
> /home/frederik/cabal-1.1.4
> $ which ghc      
> /home/frederik/arch/i386/bin/ghc
> $ make install   
> mkdir -p dist/tmp
> /usr/bin/ghc --make -Wall -fno-warn-unused-matches -cpp -i. -odir dist/tmp -hidir dist/tmp Setup.lhs -o setup
> make: /usr/bin/ghc: Command not found
> make: *** [setup] Error 127
>
> If I want to specify a different version of GHC than the one I
> normally use, then I could do:
>
> $ PATH=special-version-dir:$PATH make install

similar to:
> $ HCBASE=special-version-dir make install

which works now, right?  One disadvantage to using PATH is in the case
where you want to use the GHC in /usr/local, but some other tool in
/usr.

> Why the cabal makefile has to introduce a new variable HCBASE to
> achieve this functionality, I don't understand. It makes the normal
> user's life much harder by breaking a standard Unix abstraction layer;
> and at the same time it barely makes anyone else's life any easier.

It's only been a few years without anyone complaining ;)

> Also, I think it is more standard to use PREFIX to refer to what
> appears as PREF in the makefile.

If no one has any objections, I'd be happy to apply a tested patch for
this.

peace,

  isaac


More information about the Libraries mailing list