From: sof Date: Wed, 29 May 2002 22:11:59 +0000 (+0000) Subject: [project @ 2002-05-29 22:11:58 by sof] X-Git-Tag: Approx_11550_changesets_converted~2004 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=712f906d070021b0fc6cef2727ccf9913d3cc374;hp=1f1287d7591e3cfe19a2cd5fde23175753cb91d7;p=ghc-hetmet.git [project @ 2002-05-29 22:11:58 by sof] Use HOSTPLATFORM / *_HOST_OS (instead of TARGET equivalents), as we're dealing with host-specific properties, not that of the target. --- diff --git a/ghc/utils/ghc-pkg/Main.hs b/ghc/utils/ghc-pkg/Main.hs index 40a5d90..b875ce3 100644 --- a/ghc/utils/ghc-pkg/Main.hs +++ b/ghc/utils/ghc-pkg/Main.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.22 2002/04/22 14:20:41 simonmar Exp $ +-- $Id: Main.hs,v 1.23 2002/05/29 22:11:58 sof Exp $ -- -- Package management tool ----------------------------------------------------------------------------- @@ -24,7 +24,7 @@ import List ( isPrefixOf ) #include "../../includes/config.h" -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS import Win32DLL #endif @@ -75,7 +75,7 @@ flags = [ "Automatically build libs for GHCi (with -a)" ] -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS subst a b ls = map (\ x -> if x == a then b else x) ls unDosifyPath xs = subst '\\' '/' xs @@ -85,7 +85,7 @@ runit clis = do conf_file <- case [ f | Config f <- clis ] of fs@(_:_) -> return (last fs) -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS [] -> die "missing -f option, location of package.conf unknown" #else [] -> do h <- getModuleHandle Nothing diff --git a/ghc/utils/ghc-pkg/Makefile b/ghc/utils/ghc-pkg/Makefile index 7c9cd50..ba72ce1 100644 --- a/ghc/utils/ghc-pkg/Makefile +++ b/ghc/utils/ghc-pkg/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.16 2002/04/30 14:40:56 simonmar Exp $ +# $Id: Makefile,v 1.17 2002/05/29 22:11:59 sof Exp $ TOP=../.. include $(TOP)/mk/boilerplate.mk @@ -13,16 +13,15 @@ INSTALLING=1 SRC_HC_OPTS += -cpp -DPKG_TOOL -DWANT_PRETTY -package lang \ -package util -package text -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" HS_PROG = ghc-pkg.bin INSTALL_LIBEXECS += $(HS_PROG) -else + +ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" HS_PROG = ghc-pkg.exe INSTALL_PROGS += $(HS_PROG) SRC_HC_OPTS += -package win32 endif - # ----------------------------------------------------------------------------- # ghc-pkg script @@ -39,7 +38,7 @@ GHCPKGBIN=$(FPTOOLS_TOP_ABS)/ghc/utils/ghc-pkg/$(HS_PROG) PKGCONF=$(FPTOOLS_TOP_ABS)/ghc/driver/package.conf.inplace endif -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALLED_SCRIPT_PROG = ghc-pkg-$(ProjectVersion) endif INPLACE_SCRIPT_PROG = ghc-pkg-inplace @@ -47,14 +46,14 @@ INPLACE_SCRIPT_PROG = ghc-pkg-inplace SCRIPT_OBJS = ghc-pkg.sh INTERP = $(SHELL) SCRIPT_SUBST_VARS = GHCPKGBIN PKGCONFOPT -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALL_SCRIPTS += $(SCRIPT_PROG) endif PKGCONFOPT = -f $(PKGCONF) ifeq "$(INSTALLING)" "1" SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" LINK = ghc-pkg endif else