From: Ian Lynagh Date: Mon, 14 May 2007 11:04:09 +0000 (+0000) Subject: Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs X-Git-Tag: directory_2007-05-24~8 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=c75ef63814e0ecd51d8b8a4b2d580f6ab426d9ca;p=haskell-directory.git Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs --- diff --git a/Setup.hs b/Setup.hs index 4c6ae13..693b16d 100644 --- a/Setup.hs +++ b/Setup.hs @@ -15,6 +15,7 @@ import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Utils import System.Cmd import System.Environment +import System.FilePath import System.Info main :: IO () @@ -74,8 +75,16 @@ type PostConfHook = Args -> ConfigFlags -> PackageDescription -> LocalBuildInfo build_primitive_sources :: Hook a -> Hook a build_primitive_sources f pd lbi uhs x = do when (compilerFlavor (compiler lbi) == GHC) $ do - maybeExit $ system "../../utils/genprimopcode/genprimopcode --make-haskell-source < ../../compiler/prelude/primops.txt > GHC/Prim.hs" - maybeExit $ system "../../utils/genprimopcode/genprimopcode --make-haskell-wrappers < ../../compiler/prelude/primops.txt > GHC/PrimopWrappers.hs" + let genprimopcode = joinPath ["..", "..", "utils", + "genprimopcode", "genprimopcode"] + primops = joinPath ["..", "..", "compiler", "prelude", + "primops.txt"] + primhs = joinPath ["GHC", "Prim.hs"] + primopwrappers = joinPath ["GHC", "PrimopWrappers.hs"] + maybeExit $ system (genprimopcode ++ " --make-haskell-source < " + ++ primops ++ " > " ++ primhs) + maybeExit $ system (genprimopcode ++ " --make-haskell-wrappers < " + ++ primops ++ " > " ++ primopwrappers) f pd lbi uhs x add_ghc_options :: [String] -> Hook a -> Hook a