Commit 865956a6 authored by bos's avatar bos Committed by Bryan O'Sullivan
Browse files

Cause "make install" to install dynamic libraries (#8194)

Our special ghc-cabal command needs to be told that we are building with
dynamic library support when it does its copying. We do so by passing an
extra parameter from ghc.mk.
parent 81610b0e
...@@ -918,7 +918,8 @@ install_packages: rts/dist/package.conf.install ...@@ -918,7 +918,8 @@ install_packages: rts/dist/package.conf.install
'$(DESTDIR)' \ '$(DESTDIR)' \
'$(prefix)' \ '$(prefix)' \
'$(ghclibdir)' \ '$(ghclibdir)' \
'$(docdir)/html/libraries')) '$(docdir)/html/libraries' \
'$(GhcLibWays)'))
"$(INSTALLED_GHC_PKG_REAL)" --force --global-package-db "$(INSTALLED_PACKAGE_CONF)" update rts/dist/package.conf.install "$(INSTALLED_GHC_PKG_REAL)" --force --global-package-db "$(INSTALLED_PACKAGE_CONF)" update rts/dist/package.conf.install
$(foreach p, $(INSTALL_PACKAGES), \ $(foreach p, $(INSTALL_PACKAGES), \
$(call make-command, \ $(call make-command, \
......
...@@ -40,9 +40,10 @@ main = do hSetBuffering stdout LineBuffering ...@@ -40,9 +40,10 @@ main = do hSetBuffering stdout LineBuffering
doCheck dir doCheck dir
"copy" : dir : distDir "copy" : dir : distDir
: strip : myDestDir : myPrefix : myLibdir : myDocdir : strip : myDestDir : myPrefix : myLibdir : myDocdir
: args' -> : ghcLibWays : args' ->
doCopy dir distDir doCopy dir distDir
strip myDestDir myPrefix myLibdir myDocdir strip myDestDir myPrefix myLibdir myDocdir
("dyn" `elem` words ghcLibWays)
args' args'
"register" : dir : distDir : ghc : ghcpkg : topdir "register" : dir : distDir : ghc : ghcpkg : topdir
: myDestDir : myPrefix : myLibdir : myDocdir : myDestDir : myPrefix : myLibdir : myDocdir
...@@ -127,11 +128,11 @@ runHsColour directory distdir args ...@@ -127,11 +128,11 @@ runHsColour directory distdir args
$ defaultMainArgs ("hscolour" : "--builddir" : distdir : args) $ defaultMainArgs ("hscolour" : "--builddir" : distdir : args)
doCopy :: FilePath -> FilePath doCopy :: FilePath -> FilePath
-> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> Bool
-> [String] -> [String]
-> IO () -> IO ()
doCopy directory distDir doCopy directory distDir
strip myDestDir myPrefix myLibdir myDocdir strip myDestDir myPrefix myLibdir myDocdir withSharedLibs
args args
= withCurrentDirectory directory $ do = withCurrentDirectory directory $ do
let copyArgs = ["copy", "--builddir", distDir] let copyArgs = ["copy", "--builddir", distDir]
...@@ -172,7 +173,8 @@ doCopy directory distDir ...@@ -172,7 +173,8 @@ doCopy directory distDir
progs' <- configureProgram verbosity stripProgram' progs progs' <- configureProgram verbosity stripProgram' progs
let lbi' = lbi { let lbi' = lbi {
withPrograms = progs', withPrograms = progs',
installDirTemplates = idts installDirTemplates = idts,
withSharedLib = withSharedLibs
} }
f pd lbi' us flags f pd lbi' us flags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment