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
9e247b06
Commit
9e247b06
authored
Jan 18, 2015
by
Andrey Mokhov
Browse files
Rename (run, terseRun) to (verboseRun, run).
parent
7d42fdac
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/Oracles/Builder.hs
View file @
9e247b06
...
...
@@ -2,7 +2,7 @@
module
Oracles.Builder
(
Builder
(
..
),
with
,
run
,
t
erseRun
,
specified
with
,
run
,
v
er
bo
seRun
,
specified
)
where
import
Data.Char
...
...
@@ -94,9 +94,8 @@ with builder = do
return
[
key
++
exe
]
-- Run the builder with a given collection of arguments
-- Raises an error if the builder is not uniquely specified in config files
run
::
ShowArgs
a
=>
Builder
->
a
->
Action
()
run
builder
as
=
do
verboseRun
::
ShowArgs
a
=>
Builder
->
a
->
Action
()
verboseRun
builder
as
=
do
needBuilder
builder
exe
<-
showArg
builder
args
<-
showArgs
as
...
...
@@ -104,17 +103,15 @@ run builder as = do
-- Run the builder with a given collection of arguments printing out a
-- terse commentary with only 'interesting' info for the builder.
-- Raises an error if the builder is not uniquely specified in config files
-- TODO: make this a default 'run', rename current 'run' to verboseRun
terseRun
::
ShowArgs
a
=>
Builder
->
a
->
Action
()
terseRun
builder
as
=
do
run
::
ShowArgs
a
=>
Builder
->
a
->
Action
()
run
builder
as
=
do
args
<-
showArgs
as
putColoured
White
$
"/--------
\n
"
++
"| Running "
++
show
builder
++
" with arguments:"
mapM_
(
putColoured
White
.
(
"| "
++
))
$
interestingInfo
builder
args
putColoured
White
$
"
\\
--------"
quietly
$
r
un
builder
as
quietly
$
verboseR
un
builder
as
interestingInfo
::
Builder
->
[
String
]
->
[
String
]
interestingInfo
builder
ss
=
case
builder
of
...
...
src/Package/Compile.hs
View file @
9e247b06
...
...
@@ -66,9 +66,9 @@ buildRule pkg @ (Package name path _) todo @ (stage, dist, _) =
-- Build using appropriate compiler
need
$
hDeps
++
cDeps
when
(
not
$
null
hSrcs
)
$
terseR
un
(
Ghc
stage
)
$
ghcArgs
pkg
todo
way
hSrcs
obj
$
r
un
(
Ghc
stage
)
$
ghcArgs
pkg
todo
way
hSrcs
obj
when
(
not
$
null
cSrcs
)
$
terseR
un
(
Gcc
stage
)
$
gccArgs
pkg
todo
cSrcs
obj
$
r
un
(
Gcc
stage
)
$
gccArgs
pkg
todo
cSrcs
obj
argListRule
::
Package
->
TodoItem
->
Rules
()
argListRule
pkg
todo
@
(
stage
,
_
,
settings
)
=
...
...
src/Package/Data.hs
View file @
9e247b06
...
...
@@ -124,9 +124,9 @@ buildRule pkg @ (Package name path _) todo @ (stage, dist, settings) =
]
&%>
\
_
->
do
need
[
argListPath
argListDir
pkg
stage
,
cabal
]
when
(
doesFileExist
$
configure
<.>
"ac"
)
$
need
[
configure
]
terseR
un
GhcCabal
$
cabalArgs
pkg
todo
r
un
GhcCabal
$
cabalArgs
pkg
todo
when
(
registerPackage
settings
)
$
terseR
un
(
GhcPkg
stage
)
$
ghcPkgArgs
pkg
todo
r
un
(
GhcPkg
stage
)
$
ghcPkgArgs
pkg
todo
postProcessPackageData
$
pathDist
</>
"package-data.mk"
argListRule
::
Package
->
TodoItem
->
Rules
()
...
...
src/Package/Dependencies.hs
View file @
9e247b06
...
...
@@ -63,12 +63,7 @@ buildRule pkg @ (Package name path _) todo @ (stage, dist, settings) = do
(
buildDir
</>
"haskell.deps"
)
%>
\
out
->
do
need
[
argListPath
argListDir
pkg
stage
]
terseRun
(
Ghc
stage
)
$
ghcArgs
pkg
todo
-- Avoid rebuilding dependecies of out if it hasn't changed:
-- Note: cannot use copyFileChanged as it depends on the source file
--deps <- liftIO $ readFile $ out <.> "new"
--writeFileChanged out deps
--liftIO $ removeFiles "." [out <.> "new"]
run
(
Ghc
stage
)
$
ghcArgs
pkg
todo
(
buildDir
</>
"c.deps"
)
%>
\
out
->
do
need
[
argListPath
argListDir
pkg
stage
]
...
...
@@ -76,7 +71,7 @@ buildRule pkg @ (Package name path _) todo @ (stage, dist, settings) = do
deps
<-
fmap
concat
$
forM
srcs
$
\
src
->
do
let
srcPath
=
path
</>
src
depFile
=
buildDir
</>
takeFileName
src
<.>
"deps"
terseR
un
(
Gcc
stage
)
$
gccArgs
srcPath
pkg
todo
r
un
(
Gcc
stage
)
$
gccArgs
srcPath
pkg
todo
liftIO
$
readFile
depFile
writeFileChanged
out
deps
liftIO
$
removeFiles
buildDir
[
"*.c.deps"
]
...
...
src/Package/Library.hs
View file @
9e247b06
...
...
@@ -25,7 +25,7 @@ arRule pkg @ (Package _ path _) todo @ (stage, dist, _) =
-- Splitting argument list into chunks as otherwise Ar chokes up
maxChunk
<-
argSizeLimit
forM_
(
chunksOfSize
maxChunk
$
libHsObjs
++
cObjs
)
$
\
os
->
do
terseR
un
Ar
$
arArgs
os
$
toStandard
out
r
un
Ar
$
arArgs
os
$
toStandard
out
ldArgs
::
Package
->
TodoItem
->
FilePath
->
Args
ldArgs
(
Package
_
path
_
)
(
stage
,
dist
,
_
)
result
=
do
...
...
@@ -45,7 +45,7 @@ ldRule pkg @ (Package name path _) todo @ (stage, dist, _) =
in
priority
2
$
(
buildDir
</>
"*.o"
)
%>
\
out
->
do
need
[
argListPath
argListDir
pkg
stage
]
terseR
un
Ld
$
ldArgs
pkg
todo
$
toStandard
out
r
un
Ld
$
ldArgs
pkg
todo
$
toStandard
out
synopsis
<-
dropWhileEnd
isPunctuation
<$>
showArg
(
Synopsis
pathDist
)
putColoured
Green
$
"/--------
\n
| Successfully built package "
++
name
++
" (stage "
++
show
stage
++
")."
...
...
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