From f1af6b5e58af6c30826719c4cfabb69597cc1664 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 31 Jul 2001 11:06:00 +0000 Subject: [PATCH] [project @ 2001-07-31 11:06:00 by simonmar] make -keep-hc-files and -keep-s-files work with --make --- ghc/compiler/main/DriverPipeline.hs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index d7a7b7e..16df189 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverPipeline.hs,v 1.93 2001/07/24 04:52:49 ken Exp $ +-- $Id: DriverPipeline.hs,v 1.94 2001/07/31 11:06:00 simonmar Exp $ -- -- GHC Driver -- @@ -952,12 +952,19 @@ compile ghci_mode summary source_unchanged have_object let hsc_lang = hscLang dyn_flags (basename, _) = splitFilename input_fn - output_fn <- case hsc_lang of - HscAsm -> newTempName (phaseInputExt As) - HscC -> newTempName (phaseInputExt HCc) - HscJava -> newTempName "java" -- ToDo - HscILX -> return (basename ++ ".ilx") -- newTempName "ilx" -- ToDo - HscInterpreted -> return (error "no output file") + keep_hc <- readIORef v_Keep_hc_files + keep_s <- readIORef v_Keep_s_files + + output_fn <- + case hsc_lang of + HscAsm | keep_s -> return (basename ++ '.':phaseInputExt As) + | otherwise -> newTempName (phaseInputExt As) + HscC | keep_hc -> return (basename ++ '.':phaseInputExt HCc) + | otherwise -> newTempName (phaseInputExt HCc) + HscJava -> newTempName "java" -- ToDo + HscILX -> return (basename ++ ".ilx") + -- newTempName "ilx" -- ToDo + HscInterpreted -> return (error "no output file") let dyn_flags' = dyn_flags { hscOutName = output_fn, hscStubCOutName = basename ++ "_stub.c", -- 1.7.10.4