[project @ 2002-02-13 15:48:03 by simonmar]
authorsimonmar <unknown>
Wed, 13 Feb 2002 15:48:03 +0000 (15:48 +0000)
committersimonmar <unknown>
Wed, 13 Feb 2002 15:48:03 +0000 (15:48 +0000)
Build $(GHCI_LIBRARY) whenever we build $(LIBRARY), not just when
$(PACAGE) is set.

mk/package.mk

index 7a628f9..c7ed72f 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: package.mk,v 1.3 2002/02/13 10:45:28 simonmar Exp $
+# $Id: package.mk,v 1.4 2002/02/13 15:48:03 simonmar Exp $
 
 ifneq "$(PACKAGE)" ""
 
@@ -58,27 +58,43 @@ all :: $(LIBRARY)
 # %.o : %.lhs
 #      $(GHC_INPLACE) $(HC_OPTS) --make $<
 
+# -----------------------------------------------------------------------------
+# Installation; need to install .hi files as well as libraries
+#
+# The interface files are put inside the $(libdir), since they
+# might (potentially) be platform specific..
+#
+# override is used here because for binary distributions, datadir is
+# set on the command line. sigh.
+#
+
+override datadir:=$(libdir)/imports/$(PACKAGE)
+
+# -----------------------------------------------------------------------------
+# Dependencies
+
+MKDEPENDHS = $(GHC_INPLACE)
+SRC_MKDEPENDC_OPTS += $(patsubst %,-I%,$(ALL_DIRS)) -I$(GHC_INCLUDE_DIR)
+
+endif # $(PACKAGE) /= ""
+
 #--------------------------------------------------------------
 # Building dynamically-linkable libraries for GHCi
 #
-# Build $(GHCI_LIBRARY) from $(OBJS)
+# Build $(GHCI_LIBRARY) whenever we build $(LIBRARY)
 #
 # Why?  GHCi can only link .o files (at the moment), not .a files
 # so we have to build libFoo.o as well as libFoo.a
 #
 # Furthermore, GHCi currently never loads 
 # profiling libraries (or other non-std ways)
-#
-# Inputs:
-#   $(GHCI_LIBRARY)
-#
-# Outputs:
-#   Rule to build $(GHCI_LIBRARY)
+
+ifneq "$(LIBRARY)" ""
 
 ifeq "$(way)" ""
 ifeq "$(GhcWithInterpreter)" "YES"
 
-GHCI_LIBRARY = HS$(PACKAGE)$(_cbits)$(_way).o
+GHCI_LIBRARY = $(patsubst lib%.a,%.o,$(LIBRARY))
 
 INSTALL_LIBS += $(GHCI_LIBRARY)
 CLEAN_FILES  += $(GHCI_LIBRARY)
@@ -98,23 +114,4 @@ endif # DONT_WANT_STD_GHCI_LIB_RULE
 endif # GhcWithInterpreter
 endif # way
 
-# -----------------------------------------------------------------------------
-# Installation; need to install .hi files as well as libraries
-#
-# The interface files are put inside the $(libdir), since they
-# might (potentially) be platform specific..
-#
-# override is used here because for binary distributions, datadir is
-# set on the command line. sigh.
-#
-
-override datadir:=$(libdir)/imports/$(PACKAGE)
-
-# -----------------------------------------------------------------------------
-# Dependencies
-
-MKDEPENDHS = $(GHC_INPLACE)
-SRC_MKDEPENDC_OPTS += $(patsubst %,-I%,$(ALL_DIRS)) -I$(GHC_INCLUDE_DIR)
-
-endif # $(PACKAGE) /= ""
-
+endif # $(LIBRARY) /= ""