From: simonmar Date: Wed, 27 Feb 2002 16:29:48 +0000 (+0000) Subject: [project @ 2002-02-27 16:29:48 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2338 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d260b0b6a4df42d6e066f6b62d88301d27a88f59;p=ghc-hetmet.git [project @ 2002-02-27 16:29:48 by simonmar] Escape space characters in filenames in the Makefile generated by ghc -M. --- diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 07b0780..ec45002 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -439,17 +439,19 @@ run_phase MkDependHS basename suff input_fn output_fn hdl <- readIORef v_Dep_tmp_hdl -- std dependency of the object(s) on the source file - hPutStrLn hdl (unwords objs ++ " : " ++ basename ++ '.':suff) + hPutStrLn hdl (unwords (map escapeSpaces objs) ++ " : " ++ + escapeSpaces (basename ++ '.':suff)) let genDep (dep, False {- not an hi file -}) = - hPutStrLn hdl (unwords objs ++ " : " ++ dep) + hPutStrLn hdl (unwords (map escapeSpaces objs) ++ " : " ++ + escapeSpaces dep) genDep (dep, True {- is an hi file -}) = do hisuf <- readIORef v_Hi_suf let dep_base = remove_suffix '.' dep deps = (dep_base ++ hisuf) : map (\suf -> dep_base ++ suf ++ '_':hisuf) extra_suffixes -- length objs should be == length deps - sequence_ (zipWith (\o d -> hPutStrLn hdl (o ++ " : " ++ d)) objs deps) + sequence_ (zipWith (\o d -> hPutStrLn hdl (escapeSpaces o ++ " : " ++ escapeSpaces d)) objs deps) sequence_ (map genDep [ d | Just d <- deps ]) return (Just output_fn) @@ -472,6 +474,7 @@ run_phase MkDependHS basename suff input_fn output_fn -- (where .o is $osuf, and the other suffixes come from -- the cmdline -s options). + ----------------------------------------------------------------------------- -- Hsc phase