-- 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)
getImportsFromFile input_fn
-- build a ModLocation to pass to hscMain.
- (mod, location') <- mkHomeModLocation mod_name "." basename suff
+ (mod, location') <- mkHomeModLocation mod_name (basename ++ '.':suff)
-- take -ohi into account if present
ohi <- readIORef v_Output_hi
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"
++ pkg_framework_path_opts
++ pkg_framework_opts
#endif
- ++ if static && not no_hs_main then
- [ "-u", prefixUnderscore "Main_zdmain_closure"]
- else []))
+ ))
-- parallel only: move binary to another dir -- HWL
ways_ <- readIORef v_Ways