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
7041682e
Commit
7041682e
authored
Oct 31, 2016
by
Andrey Mokhov
Browse files
Drop redundant createDirectory calls
parent
8be3f76d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Rules/Data.hs
View file @
7041682e
...
...
@@ -47,7 +47,6 @@ buildPackageData context@Context {..} = do
|
otherwise
=
oldPath
-/-
"build"
-/-
pkgNameString
package
copyFile
inTreeMk
mk
autogenFiles
<-
getDirectoryFiles
oldBuild
[
"autogen/*"
]
createDirectory
$
buildPath
context
-/-
"autogen"
forM_
autogenFiles
$
\
file'
->
do
let
file
=
unifyPath
file'
copyFile
(
oldBuild
-/-
file
)
(
buildPath
context
-/-
file
)
...
...
src/Rules/Gmp.hs
View file @
7041682e
...
...
@@ -44,14 +44,12 @@ gmpRules = do
any
(`
isInfixOf
`
configMk
)
[
"HaveFrameworkGMP = YES"
,
"HaveLibGmp = YES"
]
then
do
putBuild
"| GMP library/framework detected and will be used"
createDirectory
$
takeDirectory
header
copyFile
(
gmpBase
-/-
"ghc-gmp.h"
)
header
else
do
putBuild
"| No GMP library/framework detected; in tree GMP will be built"
need
[
gmpLibrary
]
createDirectory
gmpObjects
build
$
Target
gmpContext
Ar
[
gmpLibrary
]
[
gmpObjects
]
createDirectory
$
takeDirectory
header
copyFile
(
gmpBuildPath
-/-
"gmp.h"
)
header
copyFile
(
gmpBuildPath
-/-
"gmp.h"
)
gmpLibraryInTreeH
...
...
src/Rules/Libffi.hs
View file @
7041682e
...
...
@@ -70,7 +70,6 @@ libffiRules = do
libffiMakefile
<.>
"in"
%>
\
mkIn
->
do
removeDirectory
libffiBuildPath
createDirectory
$
buildRootPath
-/-
stageString
Stage0
tarball
<-
unifyPath
.
getSingleton
"Exactly one LibFFI tarball is expected"
<$>
getDirectoryFiles
""
[
"libffi-tarballs/libffi*.tar.gz"
]
...
...
src/Util.hs
View file @
7041682e
...
...
@@ -92,7 +92,7 @@ captureStdout target path argList = do
Stdout
output
<-
cmd
[
path
]
argList
writeFileChanged
file
output
-- | Copy a file tracking the source.
-- | Copy a file tracking the source
, create the target directory if missing
.
copyFile
::
FilePath
->
FilePath
->
Action
()
copyFile
source
target
=
do
need
[
source
]
-- Guarantee source is built before printing progress info.
...
...
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