-----------------------------------------------------------------------------
--- $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
-----------------------------------------------------------------------------
#include "../../includes/config.h"
-#ifdef mingw32_TARGET_OS
+#ifdef mingw32_HOST_OS
import Win32DLL
#endif
"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
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
# -----------------------------------------------------------------------------
-# $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
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
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
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