Commit c9ae45b4 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Fix missing directory

See #289.
parent d12066d8
...@@ -38,19 +38,20 @@ gmpRules :: Rules () ...@@ -38,19 +38,20 @@ gmpRules :: Rules ()
gmpRules = do gmpRules = do
-- Copy appropriate GMP header and object files -- Copy appropriate GMP header and object files
gmpLibraryH %> \header -> do gmpLibraryH %> \header -> do
createDirectory $ takeDirectory header
windows <- windowsHost windows <- windowsHost
configMk <- readFile' $ gmpBase -/- "config.mk" configMk <- readFile' $ gmpBase -/- "config.mk"
if not windows && -- TODO: We don't use system GMP on Windows. Fix? if not windows && -- TODO: We don't use system GMP on Windows. Fix?
any (`isInfixOf` configMk) [ "HaveFrameworkGMP = YES", "HaveLibGmp = YES" ] any (`isInfixOf` configMk) [ "HaveFrameworkGMP = YES", "HaveLibGmp = YES" ]
then do then do
putBuild "| GMP library/framework detected and will be used" putBuild "| GMP library/framework detected and will be used"
createDirectory $ takeDirectory header
copyFile (gmpBase -/- "ghc-gmp.h") header copyFile (gmpBase -/- "ghc-gmp.h") header
else do else do
putBuild "| No GMP library/framework detected; in tree GMP will be built" putBuild "| No GMP library/framework detected; in tree GMP will be built"
need [gmpLibrary] need [gmpLibrary]
createDirectory gmpObjects createDirectory gmpObjects
build $ Target gmpContext Ar [gmpLibrary] [gmpObjects] build $ Target gmpContext Ar [gmpLibrary] [gmpObjects]
createDirectory $ takeDirectory header
copyFile (gmpBuildPath -/- "gmp.h") header copyFile (gmpBuildPath -/- "gmp.h") header
copyFile (gmpBuildPath -/- "gmp.h") gmpLibraryInTreeH copyFile (gmpBuildPath -/- "gmp.h") gmpLibraryInTreeH
......
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