Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
0b47b7e4
Commit
0b47b7e4
authored
Aug 26, 2009
by
Ian Lynagh
Browse files
"ghc-cabal install" now needs to know where GHC is, to get the ABI hash
parent
e8842f6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc.mk
View file @
0b47b7e4
...
...
@@ -777,8 +777,10 @@ INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf
# Install packages in the right order, so that ghc-pkg doesn't complain.
# Also, install ghc-pkg first.
ifeq
"$(Windows)" "NO"
INSTALLED_GHC_REAL
=
$(DESTDIR)$(ghclibexecdir)
/ghc-stage2
INSTALLED_GHC_PKG_REAL
=
$(DESTDIR)$(ghclibexecdir)
/ghc-pkg
else
INSTALLED_GHC_REAL
=
$(DESTDIR)$(bindir)
/ghc-stage2.exe
INSTALLED_GHC_PKG_REAL
=
$(DESTDIR)$(bindir)
/ghc-pkg.exe
endif
...
...
@@ -792,13 +794,15 @@ install_packages: libffi/package.conf.install rts/package.conf.install
"
$(INSTALLED_GHC_PKG_REAL)
"
--force
--global-conf
$(INSTALLED_PACKAGE_CONF)
update rts/package.conf.install
$(
foreach
p,
$(PACKAGES)
$(PACKAGES_STAGE2)
,
\
"
$(GHC_CABAL_INPLACE)
"
install
\
$(INSTALLED_GHC_REAL)
\
$(INSTALLED_GHC_PKG_REAL)
\
$(
INSTALLED_PACKAGE_CONF
)
\
$(
DESTDIR)$(topdir
)
\
libraries/
$p
dist-install
\
'
$(DESTDIR)
'
'
$(prefix)
'
'
$(ghclibdir)
'
'
$(docdir)
/html/libraries'
&&
)
true
"
$(GHC_CABAL_INPLACE)
"
install
\
$(INSTALLED_GHC_REAL)
\
$(INSTALLED_GHC_PKG_REAL)
\
$(
INSTALLED_PACKAGE_CONF
)
\
$(
DESTDIR)$(topdir
)
\
compiler stage2
\
'
$(DESTDIR)
'
'
$(prefix)
'
'
$(ghclibdir)
'
'
$(docdir)
/html/libraries'
...
...
utils/ghc-cabal/ghc-cabal.hs
View file @
0b47b7e4
...
...
@@ -34,9 +34,9 @@ main = do args <- getArgs
runHaddock
distDir
dir
args'
"check"
:
dir
:
[]
->
doCheck
dir
"install"
:
ghc
pkg
:
ghcpkg
config
:
directory
:
distDir
"install"
:
ghc
:
ghcpkg
:
topdir
:
directory
:
distDir
:
myDestDir
:
myPrefix
:
myLibdir
:
myDocdir
:
args'
->
doInstall
ghc
pkg
ghcpkg
config
directory
distDir
doInstall
ghc
ghcpkg
topdir
directory
distDir
myDestDir
myPrefix
myLibdir
myDocdir
args'
"configure"
:
args'
->
case
break
(
==
"--"
)
args'
of
(
config_args
,
"--"
:
distdir
:
directories
)
->
...
...
@@ -111,8 +111,9 @@ runHaddock distdir directory args
=
f
pd
lbi
us
flags
doInstall
::
FilePath
->
FilePath
->
FilePath
->
FilePath
->
FilePath
->
FilePath
->
FilePath
->
FilePath
->
[
String
]
->
IO
()
doInstall
ghcpkg
ghcpkgconf
directory
distDir
myDestDir
myPrefix
myLibdir
myDocdir
args
->
FilePath
->
FilePath
->
FilePath
->
FilePath
->
[
String
]
->
IO
()
doInstall
ghc
ghcpkg
topdir
directory
distDir
myDestDir
myPrefix
myLibdir
myDocdir
args
=
withCurrentDirectory
directory
$
do
defaultMainWithHooksArgs
hooks
([
"copy"
,
"--builddir"
,
distDir
]
++
(
if
null
myDestDir
then
[]
...
...
@@ -146,16 +147,25 @@ doInstall ghcpkg ghcpkgconf directory distDir myDestDir myPrefix myLibdir myDocd
docdir
=
toPathTemplate
(
myDocdir
</>
"$pkg"
),
htmldir
=
toPathTemplate
"$docdir"
}
progs
=
withPrograms
lbi
prog
=
ConfiguredProgram
{
programId
=
programName
ghcPkgProgram
,
programVersion
=
Nothing
,
programArgs
=
[
"--global-conf"
,
ghcpkgconf
]
++
if
not
(
null
myDestDir
)
then
[
"--force"
]
else
[]
,
programLocation
=
UserSpecified
ghcpkg
}
progs'
=
updateProgram
prog
progs
ghcProg
=
ConfiguredProgram
{
programId
=
programName
ghcProgram
,
programVersion
=
Nothing
,
programArgs
=
[
"-B"
++
topdir
],
programLocation
=
UserSpecified
ghc
}
ghcpkgconf
=
topdir
</>
"package.conf"
ghcPkgProg
=
ConfiguredProgram
{
programId
=
programName
ghcPkgProgram
,
programVersion
=
Nothing
,
programArgs
=
[
"--global-conf"
,
ghcpkgconf
]
++
if
not
(
null
myDestDir
)
then
[
"--force"
]
else
[]
,
programLocation
=
UserSpecified
ghcpkg
}
progs'
=
updateProgram
ghcProg
$
updateProgram
ghcPkgProg
progs
lbi'
=
lbi
{
installDirTemplates
=
idts'
,
withPrograms
=
progs'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment