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

genapply now has a Cabal build

parent 96d66f0c
......@@ -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 -/- "GenApply.o" %> \obj -> do
let src = pkgPath pkg -/- "GenApply.hs"
need [src]
build $ fullTargetWithWay target (Ghc stage) vanilla [src] [obj]
matchBuildResult buildPath "o-boot" ?> \obj -> do
(src, deps) <- dependencies buildPath obj
need $ src : deps
......
module Rules.Data (buildPackageData) where
import Expression
import GHC (genapply, genprimopcode, hp2ps)
import GHC (genprimopcode, hp2ps)
import Oracles
import Predicates (registerPackage)
import Rules.Actions
......@@ -47,30 +47,6 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
postProcessPackageData $ path -/- "package-data.mk"
-- TODO: Track dependency on this generated file
-- TODO: Use a cabal file instead of manual hacks?
priority 2.0 $
when (pkg == genapply) $ path -/- "package-data.mk" %> \mk -> do
ghcUnreg <- flag GhcUnregisterised
let hcOpts = "-package pretty" ++ if ghcUnreg then " -DNO_REGS" else ""
contents = unlines
[ "utils_genapply_dist-boot_MODULES = GenApply"
, "utils_genapply_dist-boot_PROGNAME = genapply"
, "utils_genapply_dist-boot_HS_SRC_DIRS = ."
, "utils_genapply_dist-boot_INSTALL_INPLACE = YES"
, "utils_genapply_dist-boot_HC_OPTS = " ++ hcOpts ]
writeFileChanged mk contents
priority 2.0 $
when (pkg == genprimopcode) $ path -/- "package-data.mk" %> \mk -> do
let contents = unlines
[ "utils_genprimopcode_dist-boot_MODULES = Lexer Main ParserM Parser Syntax"
, "utils_genprimopcode_dist-boot_PROGNAME = genprimopcode"
, "utils_genprimopcode_dist-boot_HS_SRC_DIRS = ."
, "utils_genprimopcode_dist-boot_INSTALL_INPLACE = YES"
, "utils_genprimopcode_dist-boot_HC_OPTS = -package array" ]
writeFileChanged mk contents
-- TODO: PROGNAME was $(CrossCompilePrefix)hp2ps
-- TODO: code duplication around ghcIncludeDirs
-- TODO: now using DEP_EXTRA_LIBS instead of EXTRA_LIBRARIES
......
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