Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
GHC
Commits
a0afb987
Commit
a0afb987
authored
8 years ago
by
Andrey Mokhov
Browse files
Options
Downloads
Patches
Plain Diff
Minor revision
parent
0d8713a4
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/Expression.hs
+2
-2
2 additions, 2 deletions
src/Expression.hs
src/Rules/Gmp.hs
+4
-7
4 additions, 7 deletions
src/Rules/Gmp.hs
src/Rules/Libffi.hs
+3
-7
3 additions, 7 deletions
src/Rules/Libffi.hs
src/Rules/Library.hs
+2
-2
2 additions, 2 deletions
src/Rules/Library.hs
with
11 additions
and
18 deletions
src/Expression.hs
+
2
−
2
View file @
a0afb987
...
...
@@ -16,7 +16,7 @@ module Expression (
-- * Convenient accessors
getContext
,
getStage
,
getPackage
,
getBuilder
,
getOutputs
,
getInputs
,
getWay
,
getInput
,
getOutput
,
getInput
,
getOutput
,
getSingleton
,
-- * Re-exports
module
Control
.
Monad
.
Trans
.
Reader
,
...
...
@@ -206,7 +206,7 @@ getOutput = do
getSingleton
getOutputs
$
"getOutput: exactly one output file expected in target "
++
show
target
getSingleton
::
Expr
[
a
]
->
String
->
Expr
a
getSingleton
::
Monad
m
=>
m
[
a
]
->
String
->
m
a
getSingleton
expr
msg
=
expr
>>=
\
case
[
res
]
->
return
res
_
->
error
msg
This diff is collapsed.
Click to expand it.
src/Rules/Gmp.hs
+
4
−
7
View file @
a0afb987
module
Rules.Gmp
(
gmpRules
,
gmpContext
)
where
module
Rules.Gmp
(
gmpRules
)
where
import
Base
import
Builder
...
...
@@ -81,12 +81,9 @@ gmpRules = do
-- gmp-4.2.4.tar.bz2 repacked without the doc/ directory contents.
-- That's because the doc/ directory contents are under the GFDL,
-- which causes problems for Debian.
tarballs
<-
getDirectoryFiles
""
[
gmpBase
-/-
"tarball/gmp*.tar.bz2"
]
tarball
<-
case
tarballs
of
-- TODO: Drop code duplication.
[
file
]
->
return
$
unifyPath
file
_
->
error
$
"gmpRules: exactly one tarball expected"
++
"(found: "
++
show
tarballs
++
")."
let
tarballs
=
gmpBase
-/-
"tarball/gmp*.tar.bz2"
tarball
<-
unifyPath
<$>
getSingleton
(
getDirectoryFiles
""
[
tarballs
])
"Exactly one GMP tarball is expected."
withTempDir
$
\
dir
->
do
let
tmp
=
unifyPath
dir
need
[
tarball
]
...
...
This diff is collapsed.
Click to expand it.
src/Rules/Libffi.hs
+
3
−
7
View file @
a0afb987
...
...
@@ -80,13 +80,9 @@ libffiRules = do
libffiMakefile
<.>
"in"
%>
\
mkIn
->
do
removeDirectory
libffiBuildPath
createDirectory
$
buildRootPath
-/-
stageString
Stage0
tarballs
<-
getDirectoryFiles
""
[
"libffi-tarballs/libffi*.tar.gz"
]
tarball
<-
case
tarballs
of
-- TODO: Drop code duplication.
[
file
]
->
return
$
unifyPath
file
_
->
error
$
"libffiRules: exactly one tarball expected"
++
"(found: "
++
show
tarballs
++
")."
let
tarballs
=
"libffi-tarballs/libffi*.tar.gz"
tarball
<-
unifyPath
<$>
getSingleton
(
getDirectoryFiles
""
[
tarballs
])
"Exactly one LibFFI tarball is expected."
need
[
tarball
]
let
libname
=
dropExtension
.
dropExtension
$
takeFileName
tarball
...
...
This diff is collapsed.
Click to expand it.
src/Rules/Library.hs
+
2
−
2
View file @
a0afb987
...
...
@@ -9,9 +9,9 @@ import Base
import
Context
import
Expression
import
Flavour
import
GHC
import
Oracles.PackageData
import
Rules.Actions
import
Rules.Gmp
import
Settings
import
Settings.Paths
import
Target
...
...
@@ -96,7 +96,7 @@ hSources context = do
extraObjects
::
Context
->
Action
[
FilePath
]
extraObjects
context
|
context
==
gmpContext
=
do
|
package
context
==
integerGmp
=
do
need
[
gmpLibraryH
]
map
unifyPath
<$>
getDirectoryFiles
""
[
gmpObjects
-/-
"*.o"
]
|
otherwise
=
return
[]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment