From 7a51ca4fd60b28a12d7d2a3ee0f66a0e946dbf79 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 31 Aug 2007 01:54:42 +0000 Subject: [PATCH] Fix installing the libraries when there is no DESTDIR --- libraries/Makefile | 2 +- libraries/installPackage.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/Makefile b/libraries/Makefile index 3163fc6..8e859af 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -322,7 +322,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \ install.library.%: installPackage/installPackage ifBuildable/ifBuildable if ifBuildable/ifBuildable $*; then \ cd $* && \ - ../installPackage/installPackage $(DESTDIR) $(prefix) $(FPTOOLS_TOP_ABS)/$(GHC_PKG_DIR_REL)/ghc-pkg-inplace $(DESTDIR)$(libdir)/package.conf; \ + ../installPackage/installPackage "$(DESTDIR)" $(prefix) $(FPTOOLS_TOP_ABS)/$(GHC_PKG_DIR_REL)/ghc-pkg-inplace $(DESTDIR)$(libdir)/package.conf; \ fi .PHONY: binary-dist binary-dist.library.% diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs index 31d9ed1..612b2fe 100644 --- a/libraries/installPackage.hs +++ b/libraries/installPackage.hs @@ -27,7 +27,8 @@ main = do args <- getArgs doit :: FilePath -> FilePath -> FilePath -> FilePath -> Verbosity -> IO () doit destdir pref ghcpkg ghcpkgconf verbosity = do let userHooks = simpleUserHooks - copyFlags = (emptyCopyFlags (CopyTo destdir)) { + copyto = if null destdir then NoCopyDest else CopyTo destdir + copyFlags = (emptyCopyFlags copyto) { copyVerbose = verbosity } registerFlags = emptyRegisterFlags { -- 1.7.10.4