[project @ 2000-12-12 12:10:08 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverPipeline.hs
index 68e1981..c0951ac 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.37 2000/12/05 12:15:19 rrt Exp $
+-- $Id: DriverPipeline.hs,v 1.40 2000/12/07 16:39:40 simonmar Exp $
 --
 -- GHC Driver
 --
@@ -430,7 +430,7 @@ run_phase Hsc basename suff input_fn output_fn
   -- date wrt M.hs (or M.o doesn't exist) so we must recompile regardless.
        do_recomp <- readIORef v_Recomp
        todo <- readIORef v_GhcMode
-        o_file' <- odir_ify (basename ++ '.':phase_input_ext Ln)
+        o_file' <- odir_ify (basename ++ '.':phaseInputExt Ln)
         o_file <- osuf_ify o_file'
        source_unchanged <- 
           if not (do_recomp && ( todo == DoLink || todo == StopBefore Ln ))
@@ -470,7 +470,11 @@ run_phase Hsc basename suff input_fn output_fn
 
            HscFail pcs -> throwDyn (PhaseFailed "hsc" (ExitFailure 1));
 
-            HscNoRecomp pcs details iface -> return False;
+            HscNoRecomp pcs details iface -> 
+               do {
+                 runSomething "Touching object file" ("touch " ++ o_file);
+                 return False;
+               };
 
            HscRecomp pcs details iface maybe_stub_h maybe_stub_c 
                      _maybe_interpreted_code -> do
@@ -653,8 +657,6 @@ run_phase SplitAs basename _suff _input_fn _output_fn
 -----------------------------------------------------------------------------
 -- Linking
 
-GLOBAL_VAR(no_hs_main, False, Bool)
-
 doLink :: [String] -> IO ()
 doLink o_files = do
     ln <- readIORef v_Pgm_l