projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e27c3aa
)
Make ghc-cabal handle "Custom" Setup.hs files that have a configure script
author
Ian Lynagh
<igloo@earth.li>
Sat, 18 Jul 2009 13:15:55 +0000
(13:15 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sat, 18 Jul 2009 13:15:55 +0000
(13:15 +0000)
utils/ghc-cabal/ghc-cabal.hs
patch
|
blob
|
history
diff --git
a/utils/ghc-cabal/ghc-cabal.hs
b/utils/ghc-cabal/ghc-cabal.hs
index
8511369
..
7d2f522
100644
(file)
--- a/
utils/ghc-cabal/ghc-cabal.hs
+++ b/
utils/ghc-cabal/ghc-cabal.hs
@@
-158,8
+158,16
@@
generate config_args distdir directory
withArgs (["configure", "--distdir", distdir] ++ config_args)
(case buildType (flattenPackageDescription gpd) of
Just Configure -> defaultMainWithHooks autoconfUserHooks
withArgs (["configure", "--distdir", distdir] ++ config_args)
(case buildType (flattenPackageDescription gpd) of
Just Configure -> defaultMainWithHooks autoconfUserHooks
- _other -> defaultMain)
- -- not quite right, but good enough for us
+ -- time has a "Custom" Setup.hs, but it's actually Configure
+ -- plus a "./Setup test" hook. However, Cabal is also
+ -- "Custom", but doesn't have a configure script.
+ Just Custom ->
+ do configureExists <- doesFileExist "configure"
+ if configureExists
+ then defaultMainWithHooks autoconfUserHooks
+ else defaultMain
+ -- not quite right, but good enough for us:
+ _ -> defaultMain)
lbi <- getPersistBuildConfig distdir
let pd0 = localPkgDescr lbi
lbi <- getPersistBuildConfig distdir
let pd0 = localPkgDescr lbi