Fix generating dependencies for different ways now we use FilePath
authorIan Lynagh <igloo@earth.li>
Tue, 15 Jan 2008 20:47:16 +0000 (20:47 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 15 Jan 2008 20:47:16 +0000 (20:47 +0000)
We were making filenames like
dist/build/GHC/Base.p_.o
rather than
dist/build/GHC/Base.p_o

compiler/main/DriverMkDepend.hs

index aad9b8a..ffafcca 100644 (file)
@@ -275,7 +275,9 @@ insertSuffixes
 insertSuffixes file_name extras
   = file_name : [ basename <.> (extra ++ "_" ++ suffix) | extra <- extras ]
   where
-    (basename, suffix) = splitExtension file_name
+    (basename, suffix) = case splitExtension file_name of
+                         -- Drop the "." from the extension
+                         (b, s) -> (b, drop 1 s)
 
 
 -----------------------------------------------------------------