[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:15:32 UTC 2010
The following commit has been merged in the master branch:
commit 82b6f176166c092027df0c4aaefadb3cad9c8918
Author: John Goerzen <jgoerzen at complete.org>
Date: Fri Dec 1 02:55:39 2006 +0100
Now properly build modules
diff --git a/MissingH.cabal b/MissingH.cabal
index 15a449f..4f9047a 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -89,8 +89,10 @@ Build-Depends: network, parsec, base,
GHC-Options: -O2
Executable: runtests
-Buildable: False
+Buildable: True
Main-Is: runtests.hs
-HS-Source-Dir: testsrc
+HS-Source-Dirs: testsrc, .
+-- The hook will automatically add the Exposed-Modules from above
+-- to Other-Modules here.
Extensions: ExistentialQuantification, OverlappingInstances,
UndecidableInstances, CPP
diff --git a/Setup.hs b/Setup.hs
index 3ef9e87..8481129 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -4,8 +4,10 @@ import Distribution.Simple
import Distribution.PackageDescription
import Distribution.Version
import System.Info
+import Data.Maybe
-winHooks = defaultUserHooks {confHook = customConfHook}
+winHooks = defaultUserHooks {confHook = customConfHook,
+ buildHook = customBuildHook}
customConfHook descrip flags =
let mydescrip = case System.Info.os of
@@ -14,6 +16,17 @@ customConfHook descrip flags =
(Dependency "unix" AnyVersion) :
buildDepends descrip}
in (confHook defaultUserHooks) mydescrip flags
+
+customBuildHook descrip lbi uh flags =
+ let myexecutables = map bdfix (executables descrip)
+ bdfix exe =
+ exe {buildInfo =
+ (buildInfo exe)
+ {otherModules =
+ exposedModules . fromJust . library $ descrip}}
+ mydescrip = descrip {executables = myexecutables}
+ in do print mydescrip
+ (buildHook defaultUserHooks) mydescrip lbi uh flags
main = defaultMainWithHooks winHooks
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list