Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/libraries/Cabal/Distribution/attic

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



rawSystemEmit :: FilePath -- ^Script name
              -> Bool     -- ^if true, emit, if false, run
              -> Int      -- ^Verbosity
              -> FilePath -- ^Program to run
              -> [String] -- ^Args
              -> IO ()
rawSystemEmit _ False verbosity path args
    = rawSystemExit verbosity path args
rawSystemEmit scriptName True verbosity path args
    = writeFile scriptName ("#!/bin/sh\n\n"
                           ++ (path ++ concatMap (' ':) args)
                           ++ "\n")
      >> putStrLn (path ++ concatMap (' ':) args)

  -- build the executables
  sequence_ [rawSystemExit (compilerPath (compiler lbi)) ["--make", modName, "-o" ++ exeName]
             | (exeName, modName, _) <- executables pkg_descr]



                TestLabel "Config" $ TestList [
                "config prefix ghc given package tool" ~: "failed" ~:
                        basicGhcConfig ~=? (parseArgs ["--prefix=/lib", "--ghc",
                                                        "--with-compiler=/bin/ghc",
                                                        "--with-pkg=/bin/ghc-pkg",
                                                        "configure"]),
               "find package tool" ~: "failed" ~:
                        basicGhcConfig ~=? (parseArgs ["--prefix=/lib", "--ghc",
                                                       "--with-compiler=/bin/ghc",
                                                       "configure"]),
               "locate compiler and package tool" ~: "failed" ~: 
                        realGhcConfig ~=? (parseArgs ["configure", "--ghc"]),
               "should we default to the current compiler?" ~: "failed" ~:
                        realGhcConfig ~=? (parseArgs ["configure"])],

 let basicGhcConfig = (ConfigCmd [Prefix "/lib",
                                        GhcFlag, 
                             (LocalBuildInfo "/lib"
                                     (Compiler GHC "/bin/ghc"
                                                   "/bin/ghc-pkg")), [])
       let realGhcConfig = (ConfigCmd (LocalBuildInfo "" (Compiler Hugs "" "")), [])

      

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].