Change HSLIB to PACKAGE and HSLIB_DEPS to PACKAGE_DEPS, which makes more
sense. Also unbreaks the build system, in an arse-about-face sort of way
(or, if you prefer, cart-before-horse).
-ifneq "$(DLLized)" "YES"
-PACKAGE = -package-name std
-else
+# *** THIS WON'T WORK ANY MORE *** (PACKAGE is now set in fptools/mk/target.mk)
+ifeq "$(DLLized)" "YES"
# Hack by SPJ to delay if-then-else until the pattern rule when we have $*
PACKAGE = $(subst ~, ,$(word $(words dummy $(findstring $(notdir $*), PrelMain )), -package-name~std))
endif
# Hack by SPJ to delay if-then-else until the pattern rule when we have $*
PACKAGE = $(subst ~, ,$(word $(words dummy $(findstring $(notdir $*), PrelMain )), -package-name~std))
endif
BOOT_SRCS += PrelPrimopWrappers.hs
BOOT_SRCS += PrelPrimopWrappers.hs
-# $Id: Makefile,v 1.29 2001/05/18 22:34:42 qrczak Exp $
+# $Id: Makefile,v 1.30 2001/07/05 13:01:16 rrt Exp $
TOP = ../../..
include $(TOP)/mk/boilerplate.mk
TOP = ../../..
include $(TOP)/mk/boilerplate.mk
IS_CBITS_LIB = YES
SRC_CC_OPTS += -Wall -DCOMPILING_STDLIB
IS_CBITS_LIB = YES
SRC_CC_OPTS += -Wall -DCOMPILING_STDLIB
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.51 2001/07/03 16:57:03 sewardj Exp $
+# $Id: Makefile,v 1.52 2001/07/05 13:01:16 rrt Exp $
#
# This is the Makefile for the runtime-system stuff.
# This stuff is written in C (and cannot be written in Haskell).
#
# This is the Makefile for the runtime-system stuff.
# This stuff is written in C (and cannot be written in Haskell).
#
# Building DLLs is only supported on mingw32 at the moment.
#
#
# Building DLLs is only supported on mingw32 at the moment.
#
ifeq "$(DLLized)" "YES"
SRC_BLD_DLL_OPTS += -lHS_imp_stub -lgmp_imp
ifeq "$(DLLized)" "YES"
SRC_BLD_DLL_OPTS += -lHS_imp_stub -lgmp_imp
endif
# add syslib dependencies and current package name
endif
# add syslib dependencies and current package name
-SRC_HC_OPTS += $(patsubst %, -package %, $(HSLIB_DEPS))
+SRC_HC_OPTS += $(patsubst %, -package %, $(PACKAGE_DEPS))
-SRC_HC_OPTS += -package-name $(HSLIB)
+SRC_HC_OPTS += -package-name $(PACKAGE)
endif
#----------------------------------------
endif
#----------------------------------------
# Building HsLibs libraries.
#
# Inputs:
# Building HsLibs libraries.
#
# Inputs:
-# $(HSLIB) is the name of the library to build
+# $(PACKAGE) is the name of the library to build
# $(IS_CBITS_LIB) should be "YES" for a "cbits" library
#
# Outputs:
# $(IS_CBITS_LIB) should be "YES" for a "cbits" library
#
# Outputs:
# on whether or not it's a "cbits" library. But you can
# override this by setting $(LIBOBJS) yourself
# on whether or not it's a "cbits" library. But you can
# override this by setting $(LIBOBJS) yourself
ifeq "$(IS_CBITS_LIB)" "YES"
_cbits := _cbits
endif
ifeq "$(IS_CBITS_LIB)" "YES"
_cbits := _cbits
endif
-LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a
-GHCI_LIBRARY = HS$(HSLIB)$(_cbits)$(_way).o
+LIBRARY = libHS$(PACKAGE)$(_cbits)$(_way).a
+GHCI_LIBRARY = HS$(PACKAGE)$(_cbits)$(_way).o
ifneq "$(IS_CBITS_LIB)" "YES"
WAYS=$(GhcLibWays)
ifneq "$(IS_CBITS_LIB)" "YES"
WAYS=$(GhcLibWays)
ifeq "$(IS_CBITS_LIB)" "YES"
override datadir:=$(libdir)/includes
ifeq "$(IS_CBITS_LIB)" "YES"
override datadir:=$(libdir)/includes
-INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(HSLIB)"').h
+INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(PACKAGE)"').h
else
SRC_CC_OPTS += -Icbits
endif
else
SRC_CC_OPTS += -Icbits
endif
#----------------------------------------
# Libraries/archives
#----------------------------------------
# Libraries/archives
# So we only put in this standard rule for packages other than std
# The rule for the Prelude is in ghc/lib/std/Makefile
# We check for GHCI_LIBRARY being HSstd.o rather than
# So we only put in this standard rule for packages other than std
# The rule for the Prelude is in ghc/lib/std/Makefile
# We check for GHCI_LIBRARY being HSstd.o rather than
-# HSLIB being std, because we want to still use the boilerplate rule
+# PACKAGE being std, because we want to still use the boilerplate rule
# for cbits.
$(GHCI_LIBRARY) :: $(LIBOBJS)
ld -r -x -o $@ $(LIBOBJS) $(STUBOBJS)
# for cbits.
$(GHCI_LIBRARY) :: $(LIBOBJS)
ld -r -x -o $@ $(LIBOBJS) $(STUBOBJS)
-SRC_BLD_DLL_OPTS += --export-all --output-def=HS$(HSLIB)$(_cbits)$(_way).def DllVersionInfo.$(way_)o
-ifneq "$(HSLIB)" "rts"
+SRC_BLD_DLL_OPTS += --export-all --output-def=HS$(PACKAGE)$(_cbits)$(_way).def DllVersionInfo.$(way_)o
+ifneq "$(PACKAGE)" "rts"
SRC_BLD_DLL_OPTS += -lHSstd_cbits_imp -L$(GHC_LIB_DIR)/std/cbits
SRC_BLD_DLL_OPTS += -lHSrts_$(way_)imp -L$(GHC_RUNTIME_DIR)
SRC_BLD_DLL_OPTS += -lHSstd_cbits_imp -L$(GHC_LIB_DIR)/std/cbits
SRC_BLD_DLL_OPTS += -lHSrts_$(way_)imp -L$(GHC_RUNTIME_DIR)
+ifneq "$(PACKAGE)" "std"
ifeq "$(IS_CBITS_LIB)" ""
SRC_BLD_DLL_OPTS += -lHSstd_$(way_)imp -L$(GHC_LIB_DIR)/std
endif
ifeq "$(IS_CBITS_LIB)" ""
SRC_BLD_DLL_OPTS += -lHSstd_$(way_)imp -L$(GHC_LIB_DIR)/std
endif
endif
SRC_BLD_DLL_OPTS += -lgmp -L. -L$(GHC_RUNTIME_DIR)/gmp
ifeq "$(IS_CBITS_LIB)" ""
endif
SRC_BLD_DLL_OPTS += -lgmp -L. -L$(GHC_RUNTIME_DIR)/gmp
ifeq "$(IS_CBITS_LIB)" ""
-SRC_BLD_DLL_OPTS += $(patsubst %,-lHS%_$(way_)imp, $(HSLIB_DEPS))
-SRC_BLD_DLL_OPTS += $(patsubst %,-L../%, $(HSLIB_DEPS))
+SRC_BLD_DLL_OPTS += $(patsubst %,-lHS%_$(way_)imp, $(PACKAGE_DEPS))
+SRC_BLD_DLL_OPTS += $(patsubst %,-L../%, $(PACKAGE_DEPS))
endif
ifneq "$(HAS_CBITS)" ""
endif
ifneq "$(HAS_CBITS)" ""
-SRC_BLD_DLL_OPTS += -lHS$(HSLIB)_cbits_imp -Lcbits
+SRC_BLD_DLL_OPTS += -lHS$(PACKAGE)_cbits_imp -Lcbits
endif
SRC_BLD_DLL_OPTS += -lwsock32 -lwinmm
endif
SRC_BLD_DLL_OPTS += -lwsock32 -lwinmm