Commit c0f3b670 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

deriveConstants now has a Cabal file

Since 314395e0
parent 4758a21d
......@@ -28,11 +28,6 @@ compilePackage _ target @ (PartialTarget stage pkg) = do
build $ fullTargetWithWay target (Ghc stage) way [src] [obj]
-- TODO: get rid of these special cases
priority 2.0 $ buildPath -/- "DeriveConstants.o" %> \obj -> do
let src = pkgPath pkg -/- "DeriveConstants.hs"
need [src]
build $ fullTargetWithWay target (Ghc stage) vanilla [src] [obj]
priority 2.0 $ buildPath -/- "GenApply.o" %> \obj -> do
let src = pkgPath pkg -/- "GenApply.hs"
need [src]
......
module Rules.Data (buildPackageData) where
import Expression
import GHC (deriveConstants, genapply, genprimopcode, hp2ps)
import GHC (genapply, genprimopcode, hp2ps)
import Oracles
import Predicates (registerPackage)
import Rules.Actions
......@@ -49,16 +49,6 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
-- TODO: Track dependency on this generated file
-- TODO: Use a cabal file instead of manual hacks?
priority 2.0 $
when (pkg == deriveConstants) $ path -/- "package-data.mk" %> \mk -> do
let contents = unlines
[ "utils_deriveConstants_dist-boot_MODULES = DeriveConstants"
, "utils_deriveConstants_dist-boot_PROGNAME = deriveConstants"
, "utils_deriveConstants_dist-boot_HS_SRC_DIRS = ."
, "utils_deriveConstants_dist-boot_INSTALL_INPLACE = YES"
, "utils_deriveConstants_dist-boot_HC_OPTS = -package process -package containers" ]
writeFileChanged mk contents
priority 2.0 $
when (pkg == genapply) $ path -/- "package-data.mk" %> \mk -> do
ghcUnreg <- flag GhcUnregisterised
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment