From: simonmar Date: Wed, 27 Feb 2002 16:24:00 +0000 (+0000) Subject: [project @ 2002-02-27 16:24:00 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2339 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6a7c6c27c8f5464402e2ae17264f5f85984ceaf1;p=ghc-hetmet.git [project @ 2002-02-27 16:24:00 by simonmar] Escape space characters in filenames in the Makefile generated from ghc -M. --- diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 6dcc627..d788dd8 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.30 2002/02/08 14:59:19 simonmar Exp $ +-- $Id: DriverUtil.hs,v 1.31 2002/02/27 16:24:00 simonmar Exp $ -- -- Utils for the driver -- @@ -191,6 +191,9 @@ newdir dir s = dir ++ '/':drop_longest_prefix s isPathSeparator remove_spaces :: String -> String remove_spaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace +escapeSpaces :: String -> String +escapeSpaces = foldr (\c s -> if isSpace c then '\\':c:s else c:s) "" + isPathSeparator :: Char -> Bool isPathSeparator ch = #ifdef mingw32_TARGET_OS