From: sof Date: Tue, 10 Jun 2003 17:54:56 +0000 (+0000) Subject: [project @ 2003-06-10 17:54:56 by sof] X-Git-Tag: Approx_11550_changesets_converted~783 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=9413f9edf73ee244ecd291c8faed5d94d934c1a4;p=ghc-hetmet.git [project @ 2003-06-10 17:54:56 by sof] Normalise filepaths of all source files before doing any processing of them. This, unsurprisingly, simplifies filepath comparisons on platforms that support multiple path syntaxes (cf., bidirectional slashes under mingw/win32.) This tentatively fixes Sourceforge bug #751175; assuming now bad interactions arise, a similar change will be made on STABLE. --- diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 9250df0..f6175e7 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.124 2003/06/04 15:47:59 simonmar Exp $ +-- $Id: Main.hs,v 1.125 2003/06/10 17:54:56 sof Exp $ -- -- GHC Driver program -- @@ -25,7 +25,8 @@ import InteractiveUI( ghciWelcomeMsg, interactiveUI ) import CompManager ( cmInit, cmLoadModules, cmDepAnal ) import HscTypes ( GhciMode(..) ) import Config ( cBooterVersion, cGhcUnregisterised, cProjectVersion ) -import SysTools ( getPackageConfigPath, initSysTools, cleanTempFiles ) +import SysTools ( getPackageConfigPath, initSysTools, cleanTempFiles, + normalisePath ) import Packages ( showPackages, getPackageConfigMap, basePackage, haskell98Package ) @@ -218,7 +219,12 @@ main = || looksLikeModuleName m || '.' `notElem` m - (srcs, objs) = partition looks_like_an_input fileish_args + (raw_srcs, objs) = partition looks_like_an_input fileish_args + + -- To simplify the handling of filepaths, we normalise all source file + -- paths right away - e.g., for win32 platforms, backslashes are converted + -- into forward slashes. + srcs = map normalisePath raw_srcs mapM_ (add v_Ld_inputs) objs