Commit 7041682e authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Drop redundant createDirectory calls

parent 8be3f76d
......@@ -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)
......
......@@ -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
......
......@@ -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"]
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment