Skip to content

Get 'builddir' from cabal.config or CABAL_BUILDDIR - #2608

Merged
ttuegel merged 5 commits into
haskell:masterfrom
ttuegel:builddir-config-2484
Jun 29, 2015
Merged

ttuegel merged 5 commits into
haskell:masterfrom
ttuegel:builddir-config-2484

Conversation

@ttuegel

@ttuegel ttuegel commented May 24, 2015

Copy link
Copy Markdown
Member

Fixes #2484. The 'builddir' option may now be specified in cabal.config
as well. It will also be read from the CABAL_BUILDDIR environment
variable, if set. The order of precedence (highest to lowest) is:

  1. --builddir command line option
  2. CABAL_BUILDDIR environment variable
  3. cabal.config setting

I've been using this myself for about a week and everything works as intended.

@edsko

edsko commented May 24, 2015

Copy link
Copy Markdown
Contributor

Just tried this and it seems to work for me. Good stuff!

@23Skidoo

Copy link
Copy Markdown
Member

Travis says that it fails on 7.4.2:

Distribution/Simple/Configure.hs:151:29:

    Module `System.Environment' does not export `lookupEnv'

Looks like you need to move D.Client.Compat.Environment.lookupEnv to D.Compat.Environment.

@ttuegel

ttuegel commented May 24, 2015

Copy link
Copy Markdown
Member Author

Oh, rats, I forgot we can't use MIN_VERSION_foo in Cabal.

@ttuegel
ttuegel force-pushed the builddir-config-2484 branch 3 times, most recently from 46e4fb9 to 8a7ab1f Compare May 25, 2015 00:12
@23Skidoo

Copy link
Copy Markdown
Member

LGTM except the loading-the-config-twice bit.

@ttuegel
ttuegel force-pushed the builddir-config-2484 branch 3 times, most recently from cf2353f to cfbacab Compare June 26, 2015 22:44
@ttuegel

ttuegel commented Jun 26, 2015

Copy link
Copy Markdown
Member Author

This needs extra testing on Windows because I had to pull in some platform-specific stuff from System.Environment.

@ttuegel
ttuegel force-pushed the builddir-config-2484 branch 2 times, most recently from e147e67 to 15bf2b4 Compare June 27, 2015 02:34
ttuegel added 3 commits June 27, 2015 13:26
Fixes haskell#2484. The 'builddir' option may now be specified in cabal.config
as well. It will also be read from the CABAL_BUILDDIR environment
variable, if set. The order of precedence (highest to lowest) is:
1. --builddir command line option
2. CABAL_BUILDDIR environment variable
3. cabal.config setting
@ttuegel
ttuegel force-pushed the builddir-config-2484 branch 2 times, most recently from 9632dee to cd506bc Compare June 27, 2015 21:16
@ttuegel
ttuegel force-pushed the builddir-config-2484 branch from 1a62c6f to 80940e2 Compare June 29, 2015 11:36
ttuegel added a commit that referenced this pull request Jun 29, 2015
Get 'builddir' from cabal.config or CABAL_BUILDDIR
@ttuegel
ttuegel merged commit 589cc88 into haskell:master Jun 29, 2015
@ttuegel
ttuegel deleted the builddir-config-2484 branch June 29, 2015 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should be possible to define builddir in cabal.config

3 participants