what is --scratchdir= for?
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Sun Aug 12 10:32:24 EDT 2007
On Fri, 2007-08-10 at 17:49 +0100, ross at soi.city.ac.uk wrote:
> Quoting Duncan Coutts <duncan.coutts at worc.ox.ac.uk>:
> > It's not clear to me what the configure --scratchdir= option is for. It
> > seems to be only used by hugs for building and installing and it
> > defaults to dist/scratch.
> Yes, --scratchdir is a hack for the Hugs build that allows it to build
> libraries that can be run inplace prior to installation. An option to
> move the whole of dist wouldn't be a replacement.
Do you think we can do this in a more similar way to how we do it for
ghc? We need to do inplace running/linking/registration for most
compilers it seems.
> I also think an option to move dist would introduce too many complications.
I've been looking at cleaning up the install dirs and build dirs code
and I don't think it'd be that bad. If people wanted it however, it
would require passing the same flag to each stage, since that directory
is essential to find the saved configuration. Another alternative is to
do what autoconf does which is to allow running setup from another
directory, so it always puts it's config relative to the current
directory, but the .cabal file could be specified and not necessarily
live in the current directory. That'd allow the whole source tree to be
read-only. eg:
cabal configure --package=../../foo/foo.cabal
cabal build
cabal install
Duncan
More information about the cabal-devel
mailing list