X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FSysTools.lhs;h=6aa04b1459c35160bbb65dd6cb2c126930703e34;hb=c72f2cb1f7eb299f9289b7a33233174d470cfa0f;hp=41421d641118ade6ba1003d124fbdc53465ec1cf;hpb=7eb5e29b4a7b6fef55512bc7bf3308e712ca3eba;p=ghc-hetmet.git diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 41421d6..6aa04b1 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -72,7 +72,7 @@ import Foreign import CString ( CString, peekCString ) #endif -#if __GLASGOW_HASKELL__ < 603 +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 603 -- rawSystem comes from libghccompat.a in stage1 import Compat.RawSystem ( rawSystem ) import System.Cmd ( system ) @@ -174,7 +174,13 @@ initSysTools mbMinusB dflags ; let installed, installed_bin :: FilePath -> FilePath installed_bin pgm = top_dir pgm installed file = top_dir file - inplace dir pgm = top_dir cPROJECT_DIR dir pgm + inplace dir pgm = top_dir +#ifndef darwin_TARGET_OS +-- Not sure where cPROJECT_DIR makes sense, on Mac OS, building with +-- xcodebuild, it surely is a *bad* idea! -=chak + cPROJECT_DIR +#endif + dir pgm ; let pkgconfig_path | am_installed = installed "package.conf" @@ -480,7 +486,7 @@ xs `isContainedIn` ys = any (xs `isPrefixOf`) (tails ys) -- binaries (see bug #1110). getGccEnv :: [Option] -> IO (Maybe [(String,String)]) getGccEnv opts = -#if __GLASGOW_HASKELL__ < 603 +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 603 return Nothing #else if null b_dirs @@ -747,7 +753,7 @@ runSomethingFiltered dflags filter_fn phase_name pgm args mb_env = do -#if __GLASGOW_HASKELL__ < 603 +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 603 builderMainLoop dflags filter_fn pgm real_args mb_env = do rawSystem pgm real_args #else