exitWith ExitSuccess
long_usage = do
- let usage_dir = findFile "ghc-usage.txt" (_GHC_DRIVER_DIR++"/ghc-usage.txt")
+ let usage_dir = findFile "ghc-usage.txt" (cGHC_DRIVER_DIR++"/ghc-usage.txt")
usage <- readFile (usage_dir++"/ghc-usage.txt")
dump usage
exitWith ExitSuccess
dump ('$':'$':s) = hPutStr stderr get_prog_name >> dump s
dump (c:s) = hPutChar stderr c >> dump s
-version_str = _ProjectVersion ++
- ( if _ProjectPatchLevel /= "0" && _ProjectPatchLevel /= ""
- then '.':_ProjectPatchLevel
+version_str = cProjectVersion ++
+ ( if cProjectPatchLevel /= "0" && cProjectPatchLevel /= ""
+ then '.':cProjectPatchLevel
else "")
-----------------------------------------------------------------------------
GLOBAL_VAR(cpp_flag, False, Bool)
hs_source_cpp_opts = global
[ "-D__HASKELL1__="++_Haskell1Version
- , "-D__GLASGOW_HASKELL__="++_ProjectVersionInt
+ , "-D__GLASGOW_HASKELL__="++cProjectVersionInt
, "-D__HASKELL98__"
, "-D__CONCURRENT_HASKELL__"
]
-- Misc
GLOBAL_VAR(dry_run, False, Bool)
GLOBAL_VAR(recomp, True, Bool)
-GLOBAL_VAR(tmp_prefix, _TMPDIR, String)
+GLOBAL_VAR(tmp_prefix, cTMPDIR, String)
GLOBAL_VAR(stolen_x86_regs, 4, Int)
GLOBAL_VAR(static, True, Bool) -- ToDo: not for mingw32
GLOBAL_VAR(collect_ghc_timing, False, Bool)
GLOBAL_VAR(n_split_files, 0, Int)
can_split :: Bool
-can_split = prefixMatch "i386" _TARGETPLATFORM
- || prefixMatch "alpha" _TARGETPLATFORM
- || prefixMatch "hppa" _TARGETPLATFORM
- || prefixMatch "m68k" _TARGETPLATFORM
- || prefixMatch "mips" _TARGETPLATFORM
- || prefixMatch "powerpc" _TARGETPLATFORM
- || prefixMatch "rs6000" _TARGETPLATFORM
- || prefixMatch "sparc" _TARGETPLATFORM
+can_split = prefixMatch "i386" cTARGETPLATFORM
+ || prefixMatch "alpha" cTARGETPLATFORM
+ || prefixMatch "hppa" cTARGETPLATFORM
+ || prefixMatch "m68k" cTARGETPLATFORM
+ || prefixMatch "mips" cTARGETPLATFORM
+ || prefixMatch "powerpc" cTARGETPLATFORM
+ || prefixMatch "rs6000" cTARGETPLATFORM
+ || prefixMatch "sparc" cTARGETPLATFORM
-----------------------------------------------------------------------------
-- Compiler output options
| HscAsm
| HscJava
-GLOBAL_VAR(hsc_lang, if _GhcWithNativeCodeGen == "YES" &&
- prefixMatch "i386" _TARGETPLATFORM
+GLOBAL_VAR(hsc_lang, if cGhcWithNativeCodeGen == "YES" &&
+ prefixMatch "i386" cTARGETPLATFORM
then HscAsm
else HscC,
HscLang)
-----------------------------------------------------------------------------
-- Programs for particular phases
-GLOBAL_VAR(pgm_dep, findFile "mkdependHS" _GHC_MKDEPENDHS, String)
-GLOBAL_VAR(pgm_L, findFile "unlit" _GHC_UNLIT, String)
-GLOBAL_VAR(pgm_P, findFile "hscpp" _GHC_HSCPP, String)
-GLOBAL_VAR(pgm_C, findFile "hsc" _GHC_HSC, String)
-GLOBAL_VAR(pgm_c, _GCC, String)
-GLOBAL_VAR(pgm_m, findFile "ghc-asm" _GHC_MANGLER, String)
-GLOBAL_VAR(pgm_s, findFile "ghc-split" _GHC_SPLIT, String)
-GLOBAL_VAR(pgm_a, _GCC, String)
-GLOBAL_VAR(pgm_l, _GCC, String)
+GLOBAL_VAR(pgm_dep, findFile "mkdependHS" cGHC_MKDEPENDHS, String)
+GLOBAL_VAR(pgm_L, findFile "unlit" cGHC_UNLIT, String)
+GLOBAL_VAR(pgm_P, findFile "hscpp" cGHC_HSCPP, String)
+GLOBAL_VAR(pgm_C, findFile "hsc" cGHC_HSC, String)
+GLOBAL_VAR(pgm_c, cGCC, String)
+GLOBAL_VAR(pgm_m, findFile "ghc-asm" cGHC_MANGLER, String)
+GLOBAL_VAR(pgm_s, findFile "ghc-split" cGHC_SPLIT, String)
+GLOBAL_VAR(pgm_a, cGCC, String)
+GLOBAL_VAR(pgm_l, cGCC, String)
-----------------------------------------------------------------------------
-- Options for particular phases
-- )
machdepCCOpts
- | prefixMatch "alpha" _TARGETPLATFORM
+ | prefixMatch "alpha" cTARGETPLATFORM
= return ( ["-static"], [] )
- | prefixMatch "hppa" _TARGETPLATFORM
+ | prefixMatch "hppa" cTARGETPLATFORM
-- ___HPUX_SOURCE, not _HPUX_SOURCE, is #defined if -ansi!
-- (very nice, but too bad the HP /usr/include files don't agree.)
= return ( ["-static", "-D_HPUX_SOURCE"], [] )
- | prefixMatch "m68k" _TARGETPLATFORM
+ | prefixMatch "m68k" cTARGETPLATFORM
-- -fno-defer-pop : for the .hc files, we want all the pushing/
-- popping of args to routines to be explicit; if we let things
-- be deferred 'til after an STGJUMP, imminent death is certain!
-- as on iX86, where we *do* steal the frame pointer [%ebp].)
= return ( [], ["-fno-defer-pop", "-fno-omit-frame-pointer"] )
- | prefixMatch "i386" _TARGETPLATFORM
+ | prefixMatch "i386" cTARGETPLATFORM
-- -fno-defer-pop : basically the same game as for m68k
--
-- -fomit-frame-pointer : *must* in .hc files; because we're stealing
"-DSTOLEN_X86_REGS="++show n_regs ]
)
- | prefixMatch "mips" _TARGETPLATFORM
+ | prefixMatch "mips" cTARGETPLATFORM
= return ( ["static"], [] )
- | prefixMatch "powerpc" _TARGETPLATFORM || prefixMatch "rs6000" _TARGETPLATFORM
+ | prefixMatch "powerpc" cTARGETPLATFORM || prefixMatch "rs6000" cTARGETPLATFORM
= return ( ["static"], ["-finhibit-size-directive"] )
| otherwise
-- let-no-escape always on for now
verb <- is_verbose
- let hi_vers = "-fhi-version="++_ProjectVersionInt
+ let hi_vers = "-fhi-version="++cProjectVersionInt
static <- (do s <- readIORef static; if s then return "-static" else return "")
l <- readIORef hsc_lang
argv' <- setTopDir argv
-- read the package configuration
- let conf = findFile "package.conf" (_GHC_DRIVER_DIR++"/package.conf.inplace")
+ let conf = findFile "package.conf" (cGHC_DRIVER_DIR++"/package.conf.inplace")
contents <- readFile conf
writeIORef package_details (read contents)
-- Generate -Rghc-timing info
on (timing) (
run_something "Generate timing stats"
- (findFile "ghc-stats" _GHC_STATS ++ ' ':stat_file)
+ (findFile "ghc-stats" cGHC_STATS ++ ' ':stat_file)
)
-- Deal with stubs
then md_regd_c_flags
else [])
++ [ verb, "-S", "-Wimplicit", opt_flag ]
- ++ [ "-D__GLASGOW_HASKELL__="++_ProjectVersionInt ]
+ ++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt ]
++ cc_opts
++ include_paths
++ pkg_extra_cc_opts
= do mangler <- readIORef pgm_m
mangler_opts <- getOpts opt_m
machdep_opts <-
- if (prefixMatch "i386" _TARGETPLATFORM)
+ if (prefixMatch "i386" cTARGETPLATFORM)
then do n_regs <- readIORef stolen_x86_regs
return [ show n_regs ]
else return []
------- version ----------------------------------------------------
- , ( "-version" , NoArg (do hPutStrLn stderr (_ProjectName
+ , ( "-version" , NoArg (do hPutStrLn stderr (cProjectName
++ ", version " ++ version_str)
exitWith ExitSuccess))
, ( "-numeric-version", NoArg (do hPutStrLn stderr version_str
-----------------------------------------------------------------------------
-- Finding files in the installation
-GLOBAL_VAR(topDir, _libdir, String)
+GLOBAL_VAR(topDir, clibdir, String)
-- grab the last -B option on the command line, and
-- set topDir to its value.
setTopDir args = do
let (minusbs, others) = partition (prefixMatch "-B") args
(case minusbs of
- [] -> writeIORef topDir _libdir
+ [] -> writeIORef topDir clibdir
some -> writeIORef topDir (drop 2 (last some)))
return others
findFile name alt_path = unsafePerformIO (do
top_dir <- readIORef topDir
let installed_file = top_dir ++ '/':name
- let inplace_file = top_dir ++ '/':_CURRENT_DIR ++ '/':alt_path
+ let inplace_file = top_dir ++ '/':cCURRENT_DIR ++ '/':alt_path
b <- fileExist inplace_file
if b then return inplace_file
else return installed_file
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.36 2000/06/25 17:20:20 panne Exp $
+# $Id: Makefile,v 1.37 2000/06/25 19:17:58 panne Exp $
#
TOP=..
@$(RM) -f Config.hs
@echo -n "Creating Config.hs ... "
@echo "module Config where" >>Config.hs
- @echo "_ProjectName = \"$(ProjectName)\"" >> Config.hs
- @echo "_ProjectVersion = \"$(ProjectVersion)\"" >> Config.hs
- @echo "_ProjectVersionInt = \"$(ProjectVersionInt)\"" >> Config.hs
- @echo "_ProjectPatchLevel = \"$(ProjectPatchLevel)\"" >> Config.hs
- @echo "_HOSTPLATFORM = \"$(HOSTPLATFORM)\"" >> Config.hs
- @echo "_TARGETPLATFORM = \"$(TARGETPLATFORM)\"" >> Config.hs
- @echo "_CURRENT_DIR = \"$(CURRENT_DIR)\"" >> Config.hs
- @echo "_GHC_LIB_DIR = \"$(GHC_LIB_DIR)\"" >> Config.hs
- @echo "_GHC_RUNTIME_DIR = \"$(GHC_RUNTIME_DIR)\"" >> Config.hs
- @echo "_GHC_UTILS_DIR = \"$(GHC_UTILS_DIR)\"" >> Config.hs
- @echo "_GHC_INCLUDE_DIR = \"$(GHC_INCLUDE_DIR)\"" >> Config.hs
- @echo "_GHC_DRIVER_DIR = \"$(GHC_DRIVER_DIR)\"" >> Config.hs
- @echo "_GCC = \"$(WhatGccIsCalled)\"" >> Config.hs
- @echo "_GhcWithNativeCodeGen = \"$(GhcWithNativeCodeGen)\"" >> Config.hs
- @echo "_LeadingUnderscore = \"$(LeadingUnderscore)\"" >> Config.hs
- @echo "_GHC_MKDEPENDHS = \"$(GHC_MKDEPENDHS)\"" >> Config.hs
- @echo "_GHC_UNLIT = \"$(GHC_UNLIT)\"" >> Config.hs
- @echo "_GHC_HSCPP = \"$(GHC_HSCPP)\"" >> Config.hs
- @echo "_GHC_HSC = \"$(GHC_HSC)\"" >> Config.hs
- @echo "_GHC_MANGLER = \"$(GHC_MANGLER)\"" >> Config.hs
- @echo "_GHC_SPLIT = \"$(GHC_SPLIT)\"" >> Config.hs
- @echo "_GHC_STATS = \"$(GHC_STATS)\"" >> Config.hs
- @echo "_GHC_SYSMAN = \"$(GHC_SYSMAN)\"" >> Config.hs
- @echo "_EnableWin32DLLs = \"$(EnableWin32DLLs)\"" >> Config.hs
- @echo "_CP = \"$(CP)\"" >> Config.hs
- @echo "_RM = \"$(RM)\"" >> Config.hs
- @echo "_CONTEXT_DIFF = \"$(CONTEXT_DIFF)\"" >> Config.hs
- @echo "_HaveLibGmp = \"$(HaveLibGmp)\"" >> Config.hs
- @echo "_GhcWithRegisterised = \"$(GhcWithRegisterised)\"" >> Config.hs
- @echo "_USER_WAY_NAMES = \"$(USER_WAY_NAMES)\"" >> Config.hs
- @echo "_USER_WAY_OPTS = \"$(USER_WAY_OPTS)\"" >> Config.hs
- @echo "_libdir = \"$(libdir)\"" >> Config.hs
- @echo "_libexecdir = \"$(libexecdir)\"" >> Config.hs
- @echo "_datadir = \"$(datadir)\"" >> Config.hs
- @echo "_bindir = \"$(bindir)\"" >> Config.hs
- @echo "_TMPDIR = \"$(TMPDIR)\"" >> Config.hs
- @echo "_FPTOOLS_TOP_ABS = \"$(FPTOOLS_TOP_ABS)\"" >> Config.hs
+ @echo "cProjectName = \"$(ProjectName)\"" >> Config.hs
+ @echo "cProjectVersion = \"$(ProjectVersion)\"" >> Config.hs
+ @echo "cProjectVersionInt = \"$(ProjectVersionInt)\"" >> Config.hs
+ @echo "cProjectPatchLevel = \"$(ProjectPatchLevel)\"" >> Config.hs
+ @echo "cHOSTPLATFORM = \"$(HOSTPLATFORM)\"" >> Config.hs
+ @echo "cTARGETPLATFORM = \"$(TARGETPLATFORM)\"" >> Config.hs
+ @echo "cCURRENT_DIR = \"$(CURRENT_DIR)\"" >> Config.hs
+ @echo "cGHC_LIB_DIR = \"$(GHC_LIB_DIR)\"" >> Config.hs
+ @echo "cGHC_RUNTIME_DIR = \"$(GHC_RUNTIME_DIR)\"" >> Config.hs
+ @echo "cGHC_UTILS_DIR = \"$(GHC_UTILS_DIR)\"" >> Config.hs
+ @echo "cGHC_INCLUDE_DIR = \"$(GHC_INCLUDE_DIR)\"" >> Config.hs
+ @echo "cGHC_DRIVER_DIR = \"$(GHC_DRIVER_DIR)\"" >> Config.hs
+ @echo "cGCC = \"$(WhatGccIsCalled)\"" >> Config.hs
+ @echo "cGhcWithNativeCodeGen = \"$(GhcWithNativeCodeGen)\"" >> Config.hs
+ @echo "cLeadingUnderscore = \"$(LeadingUnderscore)\"" >> Config.hs
+ @echo "cGHC_MKDEPENDHS = \"$(GHC_MKDEPENDHS)\"" >> Config.hs
+ @echo "cGHC_UNLIT = \"$(GHC_UNLIT)\"" >> Config.hs
+ @echo "cGHC_HSCPP = \"$(GHC_HSCPP)\"" >> Config.hs
+ @echo "cGHC_HSC = \"$(GHC_HSC)\"" >> Config.hs
+ @echo "cGHC_MANGLER = \"$(GHC_MANGLER)\"" >> Config.hs
+ @echo "cGHC_SPLIT = \"$(GHC_SPLIT)\"" >> Config.hs
+ @echo "cGHC_STATS = \"$(GHC_STATS)\"" >> Config.hs
+ @echo "cGHC_SYSMAN = \"$(GHC_SYSMAN)\"" >> Config.hs
+ @echo "cEnableWin32DLLs = \"$(EnableWin32DLLs)\"" >> Config.hs
+ @echo "cCP = \"$(CP)\"" >> Config.hs
+ @echo "cRM = \"$(RM)\"" >> Config.hs
+ @echo "cCONTEXT_DIFF = \"$(CONTEXT_DIFF)\"" >> Config.hs
+ @echo "cHaveLibGmp = \"$(HaveLibGmp)\"" >> Config.hs
+ @echo "cGhcWithRegisterised = \"$(GhcWithRegisterised)\"" >> Config.hs
+ @echo "cUSER_WAY_NAMES = \"$(USER_WAY_NAMES)\"" >> Config.hs
+ @echo "cUSER_WAY_OPTS = \"$(USER_WAY_OPTS)\"" >> Config.hs
+ @echo "clibdir = \"$(libdir)\"" >> Config.hs
+ @echo "clibexecdir = \"$(libexecdir)\"" >> Config.hs
+ @echo "cdatadir = \"$(datadir)\"" >> Config.hs
+ @echo "cbindir = \"$(bindir)\"" >> Config.hs
+ @echo "cTMPDIR = \"$(TMPDIR)\"" >> Config.hs
+ @echo "cFPTOOLS_TOP_ABS = \"$(FPTOOLS_TOP_ABS)\"" >> Config.hs
@echo done.
CLEAN_FILES += Config.hs
( "gmp", -- GMP is at the bottom of the heap
Package {
import_dirs = [],
- library_dirs = if _HaveLibGmp == "YES"
+ library_dirs = if cHaveLibGmp == "YES"
then []
else if installing
- then [ _libdir ]
- else [ ghc_src_dir _GHC_RUNTIME_DIR ++ "/gmp" ],
+ then [ clibdir ]
+ else [ ghc_src_dir cGHC_RUNTIME_DIR ++ "/gmp" ],
libraries = [ "gmp" ],
include_dir = "",
c_include = "",
Package {
import_dirs = [],
library_dirs = [ if installing
- then _libdir
- else ghc_src_dir _GHC_RUNTIME_DIR ],
+ then clibdir
+ else ghc_src_dir cGHC_RUNTIME_DIR ],
libraries = [ "HSrts" ],
include_dir = if installing
- then _libdir ++ "/includes"
- else ghc_src_dir _GHC_INCLUDE_DIR,
+ then clibdir ++ "/includes"
+ else ghc_src_dir cGHC_INCLUDE_DIR,
c_include = "Stg.h", -- ha!
package_deps = [ "gmp" ],
extra_ghc_opts = "",
( "std", -- The Prelude & Standard Libraries
Package {
import_dirs = [ if installing
- then _libdir ++ "/imports/std"
- else ghc_src_dir _GHC_LIB_DIR ++ "/std" ],
+ then clibdir ++ "/imports/std"
+ else ghc_src_dir cGHC_LIB_DIR ++ "/std" ],
library_dirs = if installing
- then [ _libdir ]
- else [ ghc_src_dir _GHC_LIB_DIR ++ "/std"
- , ghc_src_dir _GHC_LIB_DIR ++ "/std/cbits" ],
+ then [ clibdir ]
+ else [ ghc_src_dir cGHC_LIB_DIR ++ "/std"
+ , ghc_src_dir cGHC_LIB_DIR ++ "/std/cbits" ],
libraries = [ "HSstd", "HSstd_cbits" ],
include_dir = if installing
then ""
- else ghc_src_dir _GHC_LIB_DIR ++ "/std/cbits",
+ else ghc_src_dir cGHC_LIB_DIR ++ "/std/cbits",
c_include = "HsStd.h",
package_deps = [ "rts" ],
extra_ghc_opts = "",
( "lang",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/lang" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/lang"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/lang/monads"],
+ then [ clibdir ++ "/imports/lang" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/lang"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/lang/monads"],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/lang"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/lang/cbits" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/lang"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/lang/cbits" ],
libraries = [ "HSlang", "HSlang_cbits" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/lang/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/lang/cbits",
c_include = "HsLang.h",
package_deps = [],
extra_ghc_opts = "",
( "concurrent",
Package {
import_dirs = [ if installing
- then _libdir ++ "/imports/concurrent"
- else _FPTOOLS_TOP_ABS ++ "/hslibs/concurrent" ],
+ then clibdir ++ "/imports/concurrent"
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/concurrent" ],
library_dirs = [ if installing
- then _libdir
- else _FPTOOLS_TOP_ABS ++ "/hslibs/concurrent" ],
+ then clibdir
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/concurrent" ],
libraries = [ "HSconcurrent" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/concurrent/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/concurrent/cbits",
c_include = "HsConcurrent.h",
package_deps = [ "lang" ],
extra_ghc_opts = "",
( "data",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/data" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/data"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/data/edison"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Assoc"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Coll"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Seq" ],
+ then [ clibdir ++ "/imports/data" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/data"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/data/edison"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Assoc"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Coll"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/data/edison/Seq" ],
library_dirs = if installing
- then [_libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/data" ],
+ then [clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/data" ],
libraries = [ "HSdata" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/data/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/data/cbits",
c_include = "HsData.h",
package_deps = [ "lang" ],
extra_ghc_opts = "",
( "net",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/net" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/net" ],
+ then [ clibdir ++ "/imports/net" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/net" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/net"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/net/cbits" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/net"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/net/cbits" ],
libraries = [ "HSnet", "HSnet_cbits" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/net/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/net/cbits",
c_include = "HsNet.h",
package_deps = [ "lang", "text" ],
extra_ghc_opts = "",
extra_cc_opts = "",
- extra_ld_opts = if postfixMatch "solaris2" _TARGETPLATFORM
+ extra_ld_opts = if postfixMatch "solaris2" cTARGETPLATFORM
then "-lnsl -lsocket"
else ""
}
( "posix",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/posix" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/posix" ],
+ then [ clibdir ++ "/imports/posix" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/posix" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/posix"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/posix/cbits" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/posix"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/posix/cbits" ],
libraries = [ "HSposix", "HSposix_cbits" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/posix/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/posix/cbits",
c_include = "HsPosix.h",
package_deps = [ "lang" ],
extra_ghc_opts = "",
( "text",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/text" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/text"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/text/html"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/text/haxml/lib"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/text/parsec" ],
+ then [ clibdir ++ "/imports/text" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/text"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/text/html"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/text/haxml/lib"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/text/parsec" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/text"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/text/cbits" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/text"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/text/cbits" ],
libraries = [ "HStext", "HStext_cbits" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/text/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/text/cbits",
c_include = "HsText.h",
package_deps = [ "lang", "data" ],
extra_ghc_opts = "",
( "util",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/util" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/util"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/util/check" ],
+ then [ clibdir ++ "/imports/util" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/util"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/util/check" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/util"
- , _FPTOOLS_TOP_ABS ++ "/hslibs/util/cbits" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/util"
+ , cFPTOOLS_TOP_ABS ++ "/hslibs/util/cbits" ],
libraries = [ "HSutil", "HSutil_cbits" ],
include_dir = if installing
then ""
- else _FPTOOLS_TOP_ABS ++ "/hslibs/util/cbits",
+ else cFPTOOLS_TOP_ABS ++ "/hslibs/util/cbits",
c_include = "HsUtil.h",
package_deps = ["lang", "concurrent", "posix"],
extra_ghc_opts = "",
( "win32",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/win32" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/win32/src" ],
+ then [ clibdir ++ "/imports/win32" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/win32/src" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hslibs/win32/src" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hslibs/win32/src" ],
libraries = [ "HSwin32" ],
include_dir = "",
c_include = "", -- ???
( "com",
Package {
import_dirs = if installing
- then [ _libdir ++ "/imports/com" ]
- else [ _FPTOOLS_TOP_ABS ++ "/hdirect/lib" ],
+ then [ clibdir ++ "/imports/com" ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hdirect/lib" ],
library_dirs = if installing
- then [ _libdir ]
- else [ _FPTOOLS_TOP_ABS ++ "/hdirect/lib" ],
+ then [ clibdir ]
+ else [ cFPTOOLS_TOP_ABS ++ "/hdirect/lib" ],
libraries = [ "HScom" ],
include_dir = "",
c_include = "", -- ???
)
]
-ghc_src_dir path = _FPTOOLS_TOP_ABS ++ '/':_CURRENT_DIR ++ '/':path
+ghc_src_dir path = cFPTOOLS_TOP_ABS ++ '/':cCURRENT_DIR ++ '/':path
prefixMatch :: Eq a => [a] -> [a] -> Bool
prefixMatch [] str = True