X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverMkDepend.hs;h=ffafccaffb0fcad6b05d524f0516c0be511226d9;hb=dde771de24f0e02d00867e79f7c68e526475d7c6;hp=4f0dfb0e17f32b929e578d1b8c899edc6c2d4b06;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index 4f0dfb0..ffafcca 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -1,3 +1,10 @@ +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + ----------------------------------------------------------------------------- -- -- Makefile Dependency Generation @@ -6,13 +13,6 @@ -- ----------------------------------------------------------------------------- -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings --- for details - module DriverMkDepend ( doMkDependHS ) where @@ -22,7 +22,7 @@ module DriverMkDepend ( import qualified GHC import GHC ( Session, ModSummary(..) ) import DynFlags -import Util ( escapeSpaces, splitFilename, joinFileExt ) +import Util ( escapeSpaces ) import HscTypes ( HscEnv, IsBootInterface, msObjFilePath, msHsFilePath ) import SysTools ( newTempName ) import qualified SysTools @@ -42,6 +42,7 @@ import Data.IORef ( IORef, readIORef, writeIORef ) import Control.Exception import System.Exit ( ExitCode(..), exitWith ) import System.Directory +import System.FilePath import System.IO import SYSTEM_IO_ERROR ( isEOFError ) import Control.Monad ( when ) @@ -272,9 +273,11 @@ insertSuffixes -- Lots of other things will break first! insertSuffixes file_name extras - = file_name : [ basename `joinFileExt` (extra ++ "_" ++ suffix) | extra <- extras ] + = file_name : [ basename <.> (extra ++ "_" ++ suffix) | extra <- extras ] where - (basename, suffix) = splitFilename file_name + (basename, suffix) = case splitExtension file_name of + -- Drop the "." from the extension + (b, s) -> (b, drop 1 s) -----------------------------------------------------------------