Commit 88e09197 authored by Clemens Fruhwirth's avatar Clemens Fruhwirth
Browse files

Install dynlibs correctly

Add dynlibdir target to config.mk.in, setting it to @libdir@.
Invoke installPackage with dynlibdir at libraries/Makefile
Make installPackage.hs hand dynlibdir to Cabal.
parent 323f97a9
......@@ -94,6 +94,7 @@ iprefix = $$topdir
ibindir = $$topdir
ilibdir = $$topdir
ilibexecdir = $$topdir
idynlibdir = $$topdir
idatadir = $$topdir
idocdir = $$topdir/doc/libraries/$$pkg
ihaddockdir = $$topdir/doc/libraries/$$pkg
......@@ -106,6 +107,7 @@ iprefix = $(prefix)
ibindir = $(bindir)
ilibdir = $(libdir)
ilibexecdir = $(libexecdir)
idynlibdir = $(dynlibdir)
idatadir = $(datadir)
idocdir = $(docdir)/libraries/$$pkg
ihaddockdir = $(htmldir)/libraries/$$pkg
......@@ -372,7 +374,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
install.library.%: installPackage/installPackage ifBuildable/ifBuildable
if ifBuildable/ifBuildable $*; then \
cd $* && \
../installPackage/installPackage install '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \
../installPackage/installPackage install '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \
fi
.PHONY: binary-dist binary-dist.library.%
......
......@@ -17,12 +17,12 @@ main
let verbosity = mkVerbosity args'
in doRegisterInplace verbosity
"install" : ghcpkg : ghcpkgconf : destdir : topdir :
iprefix : ibindir : ilibdir : ilibexecdir :
iprefix : ibindir : ilibdir : ilibexecdir : idynlibdir :
idatadir : idocdir : ihtmldir : ihaddockdir :
args' ->
let verbosity = mkVerbosity args'
in doInstall verbosity ghcpkg ghcpkgconf destdir topdir
iprefix ibindir ilibdir ilibexecdir idatadir
iprefix ibindir ilibdir ilibexecdir idynlibdir idatadir
idocdir ihtmldir ihaddockdir
_ ->
error ("Bad arguments: " ++ show args)
......@@ -54,10 +54,10 @@ doRegisterInplace verbosity =
doInstall :: Verbosity -> FilePath -> FilePath -> FilePath -> FilePath
-> FilePath -> FilePath -> FilePath -> FilePath -> FilePath
-> FilePath -> FilePath -> FilePath
-> FilePath -> FilePath -> FilePath -> FilePath
-> IO ()
doInstall verbosity ghcpkg ghcpkgconf destdir topdir
iprefix ibindir ilibdir ilibexecdir idatadir
iprefix ibindir ilibdir ilibexecdir idynlibdir idatadir
idocdir ihtmldir ihaddockdir =
do let userHooks = simpleUserHooks
copyto = if null destdir then NoCopyDest else CopyTo destdir
......@@ -92,6 +92,7 @@ doInstall verbosity ghcpkg ghcpkgconf destdir topdir
i_copy = i { prefix = toPathTemplate' iprefix,
bindir = toPathTemplate' ibindir,
libdir = toPathTemplate' ilibdir,
dynlibdir = toPathTemplate' idynlibdir,
libexecdir = toPathTemplate' ilibexecdir,
datadir = toPathTemplate' idatadir,
docdir = toPathTemplate' idocdir,
......@@ -114,6 +115,7 @@ doInstall verbosity ghcpkg ghcpkgconf destdir topdir
i_reg = i { prefix = toPathTemplate iprefix,
bindir = toPathTemplate ibindir,
libdir = toPathTemplate ilibdir,
dynlibdir = toPathTemplate idynlibdir,
libexecdir = toPathTemplate ilibexecdir,
datadir = toPathTemplate idatadir,
docdir = toPathTemplate idocdir,
......
......@@ -557,6 +557,7 @@ datadir0 := @datadir@
libdir0 := @libdir@
includedir := @includedir@
mandir := @mandir@
dynlibdir := @libdir@
ifeq "$(RelocatableBuild)" "YES"
......
Supports Markdown
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