From b9d46a06dce3bf3bdeb805f35c35e0e68ab2f2d0 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 23 Jul 2003 14:05:51 +0000 Subject: [PATCH] [project @ 2003-07-23 14:05:51 by simonmar] Always create directories for the .o file, not just when using the compilation manager. --- ghc/compiler/main/DriverPipeline.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 81ef08d..9866b56 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -191,10 +191,6 @@ compile ghci_mode this_mod location -- we're in batch mode: finish the compilation pipeline. _other -> do let object_filename = ml_obj_file location - object_dir = directoryOf object_filename - - -- create the object dir if it doesn't exist - createDirectoryHierarchy object_dir runPipeline (StopBefore Ln) "" True Nothing output_fn (Just location) @@ -794,6 +790,10 @@ runPhase As _basename _suff input_fn get_output_fn maybe_loc output_fn <- get_output_fn Ln maybe_loc + -- we create directories for the object file, because it + -- might be a hierarchical module. + createDirectoryHierarchy (directoryOf output_fn) + SysTools.runAs (map SysTools.Option as_opts ++ [ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ] ++ [ SysTools.Option "-c" -- 1.7.10.4