From 38ffed2bdaef079912ed22326d67dbfb46f9d860 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 3 Apr 2009 16:52:16 +0000 Subject: [PATCH] Stopped the .o file being removed after compilation when the -c flag was given --- Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Main.hs b/Main.hs index 5801b8d..09a5994 100644 --- a/Main.hs +++ b/Main.hs @@ -282,9 +282,11 @@ compileFull inputFile moutputFile postHFile = outputFile ++ "_post.h" postCFile = outputFile ++ "_post.c" postOFile = outputFile ++ "_post.o" - occFile = outputFile ++ "_wrapper.occ" in - do sequence_ $ map noteFile [sFile, oFile, postCFile, postOFile, occFile] + do sequence_ $ map noteFile $ [sFile, postCFile, postOFile] + ++ if csHasMain optsPS then [oFile] else [] + -- The object file is a temporary to-be-removed + -- iff we are also linking the end product -- Compile the C into assembly, and assembly into an object file exec $ cAsmCommand cFile sFile (csCompilerFlags optsPS)