From 6a7c6c27c8f5464402e2ae17264f5f85984ceaf1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 27 Feb 2002 16:24:00 +0000 Subject: [PATCH] [project @ 2002-02-27 16:24:00 by simonmar] Escape space characters in filenames in the Makefile generated from ghc -M. --- ghc/compiler/main/DriverUtil.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.7.10.4