import CString ( CString, peekCString )
#endif
-#if __GLASGOW_HASKELL__ < 603
--- rawSystem comes from libghccompat.a in stage1
-import Compat.RawSystem ( rawSystem )
-import System.Cmd ( system )
-import GHC.IOBase ( IOErrorType(..) )
-#else
import System.Process ( runInteractiveProcess, getProcessExitCode )
import Control.Concurrent( forkIO, newChan, readChan, writeChan )
import FastString ( mkFastString )
import SrcLoc ( SrcLoc, mkSrcLoc, noSrcSpan, mkSrcSpan )
-#endif
\end{code}
; 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"
-- 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
-#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