X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMain.hs;h=030471af479d353706c464ba65e0adc95dde2e61;hb=2cc5b907318f97e19b28b2ad8ed9ff8c1f401dcc;hp=92aad1f5503dc8203da1311862c74a5634aca73f;hpb=6e3f975944cca4f7fc9037668914e6798c184741;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index 92aad1f..030471a 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,5 +1,5 @@ ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.35 2002/01/17 08:37:57 sof Exp $ +-- $Id: Main.hs,v 1.36 2002/02/12 15:17:24 simonmar Exp $ -- -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. @@ -445,7 +445,8 @@ output flags name toks = do let cProgName = outDir++outBase++"_hsc_make.c" oProgName = outDir++outBase++"_hsc_make.o" progName = outDir++outBase++"_hsc_make" ++ progNameSuffix - outHName = outDir++outBase++"_hsc.h" + outHFile = outBase++"_hsc.h" + outHName = outDir++outHFile outCName = outDir++outBase++"_hsc.c" let execProgName @@ -524,8 +525,10 @@ output flags name toks = do "#endif\n" when needsC $ writeFile outCName $ - "#include \""++outHName++"\"\n"++ + "#include \""++outHFile++"\"\n"++ concatMap outTokenC specials + -- NB. outHFile not outHName; works better when processed + -- by gcc or mkdependC. onlyOne :: String -> IO a onlyOne what = do