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
e3e3c1d6
Commit
e3e3c1d6
authored
Aug 07, 2015
by
Andrey Mokhov
Browse files
Add library targets.
parent
a6623ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Rules.hs
View file @
e3e3c1d6
...
@@ -2,15 +2,19 @@ module Rules (
...
@@ -2,15 +2,19 @@ module Rules (
oracleRules
,
cabalRules
,
configRules
,
packageRules
,
generateTargets
oracleRules
,
cabalRules
,
configRules
,
packageRules
,
generateTargets
)
where
)
where
import
Way
import
Base
import
Base
import
Util
import
Util
import
Stage
import
Stage
import
Expression
import
Expression
import
Oracles.PackageData
import
Rules.Cabal
import
Rules.Cabal
import
Rules.Config
import
Rules.Config
import
Rules.Package
import
Rules.Package
import
Rules.Oracles
import
Rules.Oracles
import
Rules.Resources
import
Rules.Resources
import
Settings.Ways
import
Settings.Util
import
Settings.Packages
import
Settings.Packages
import
Settings.TargetDirectory
import
Settings.TargetDirectory
...
@@ -19,9 +23,21 @@ generateTargets :: Rules ()
...
@@ -19,9 +23,21 @@ generateTargets :: Rules ()
generateTargets
=
action
$
do
generateTargets
=
action
$
do
targets
<-
fmap
concat
.
forM
[
Stage0
..
]
$
\
stage
->
do
targets
<-
fmap
concat
.
forM
[
Stage0
..
]
$
\
stage
->
do
pkgs
<-
interpret
(
stageTarget
stage
)
getPackages
pkgs
<-
interpret
(
stageTarget
stage
)
getPackages
fmap
concat
.
forM
pkgs
$
\
pkg
->
return
fmap
concat
.
forM
pkgs
$
\
pkg
->
do
[
targetPath
stage
pkg
-/-
"build/haskell.deps"
let
target
=
stagePackageTarget
stage
pkg
,
targetPath
stage
pkg
-/-
"build/c.deps"
]
buildPath
=
targetPath
stage
pkg
-/-
"build"
buildGhciLib
<-
interpret
target
$
getPkgData
BuildGhciLib
pkgKey
<-
interpret
target
$
getPkgData
PackageKey
let
ghciLib
=
[
buildPath
-/-
"HS"
++
pkgKey
<.>
"o"
|
buildGhciLib
==
"YES"
&&
stage
/=
Stage0
]
ways
<-
interpret
target
getWays
libs
<-
forM
ways
$
\
way
->
do
extension
<-
libsuf
way
return
$
buildPath
-/-
"libHS"
++
pkgKey
<.>
extension
return
$
ghciLib
++
libs
need
targets
need
targets
-- TODO: add Stage2 (compiler only?)
-- TODO: add Stage2 (compiler only?)
...
...
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