From: simonmar Date: Wed, 23 Jul 2003 14:05:51 +0000 (+0000) Subject: [project @ 2003-07-23 14:05:51 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~656 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b9d46a06dce3bf3bdeb805f35c35e0e68ab2f2d0 [project @ 2003-07-23 14:05:51 by simonmar] Always create directories for the .o file, not just when using the compilation manager. --- 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"