Add clean routines for fs (#533)
authorTamar Christina <Mistuke@users.noreply.github.com>
Tue, 20 Mar 2018 08:51:53 +0000 (08:51 +0000)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Tue, 20 Mar 2018 08:51:53 +0000 (09:51 +0100)
src/Rules/Clean.hs

index d11cbf5..7592c60 100644 (file)
@@ -18,6 +18,19 @@ cleanSourceTree = do
     removeDirectory inplaceBinPath
     removeDirectory inplaceLibPath
     removeDirectory "sdistprep"
+    cleanFsUtils
+
+-- Clean all temporary fs files copied by configure into the source folder
+cleanFsUtils :: Action ()
+cleanFsUtils = do
+    let dirs = [ "utils/lndir/"
+               , "utils/unlit/"
+               , "rts/"
+               , "libraries/base/include/"
+               , "libraries/base/cbits/"
+               ]
+    liftIO $ forM_ dirs (flip removeFiles ["fs.*"])
+
 
 cleanRules :: Rules ()
 cleanRules = "clean" ~> clean