#156, remove the directory if it already exists
[ghc.git] / src / Rules / Libffi.hs
index 8bcfdae..dbf50dc 100644 (file)
@@ -82,6 +82,7 @@ libffiRules = do
         need tarballs
         let libname = dropExtension . dropExtension . takeFileName $ head tarballs
 
+        removeDirectory (buildRootPath -/- libname)
         actionFinally (do
             build $ fullTarget libffiTarget Tar tarballs [buildRootPath]
             moveDirectory (buildRootPath -/- libname) libffiBuild) $