Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
c5254701
Commit
c5254701
authored
Dec 16, 2015
by
Ben Gamari
🐢
Browse files
genapply now has a Cabal build
parent
96d66f0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Rules/Compile.hs
View file @
c5254701
...
...
@@ -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
...
...
src/Rules/Data.hs
View file @
c5254701
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment