Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
fae8451a
Commit
fae8451a
authored
Jan 13, 2015
by
Andrey Mokhov
Browse files
Add hiRule.
parent
d4aabcd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Package/Compile.hs
View file @
fae8451a
...
...
@@ -29,8 +29,8 @@ suffixArgs way = arg ["-hisuf", hisuf way]
<>
arg
[
"-osuf"
,
osuf
way
]
<>
arg
[
"-hcsuf"
,
hcsuf
way
]
buildPackageCompi
le
::
Package
->
TodoItem
->
Rules
()
buildPackageCompi
le
(
Package
name
path
_
)
(
stage
,
dist
,
settings
)
=
oRu
le
::
Package
->
TodoItem
->
Rules
()
oRu
le
(
Package
name
path
_
)
(
stage
,
dist
,
settings
)
=
let
buildDir
=
path
</>
dist
</>
"build"
pkgData
=
path
</>
dist
</>
"package-data.mk"
depFile
=
buildDir
</>
name
<.>
"m"
...
...
@@ -54,3 +54,16 @@ buildPackageCompile (Package name path _) (stage, dist, settings) =
<>
when
(
splitObjects
stage
)
(
arg
"-split-objs"
)
<>
arg
(
"-c"
:
srcs
)
<>
arg
[
"-o"
,
toStandard
out
]
-- TODO: This rule looks a bit of a hack... combine it with the above?
hiRule
::
Package
->
TodoItem
->
Rules
()
hiRule
(
Package
name
path
_
)
(
stage
,
dist
,
settings
)
=
let
buildDir
=
path
</>
dist
</>
"build"
in
(
buildDir
<//>
"*hi"
)
%>
\
out
->
do
let
way
=
detectWay
$
tail
$
takeExtension
out
oFile
=
out
-<.>
osuf
way
need
[
oFile
]
buildPackageCompile
::
Package
->
TodoItem
->
Rules
()
buildPackageCompile
=
oRule
<>
hiRule
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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