[project @ 2003-05-29 14:47:05 by reid]
[ghc-hetmet.git] / mk / package.mk
index 101c68f..4d3d257 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: package.mk,v 1.26 2003/05/22 15:36:08 simonmar Exp $
+# $Id: package.mk,v 1.29 2003/05/29 14:47:05 reid Exp $
 
 ifneq "$(PACKAGE)" ""
 
@@ -59,8 +59,12 @@ CLEAN_FILES += package.conf.installed package.conf.inplace
 
 else # $(STANDALONE_PACKAGE) == "YES"
 
+# Let the package configuration file refer to $(libdir) as
+# ${pkglibdir}.  Note we can't use ${libdir} because ghc-pkg already
+# redefines it to point to GHC's libdir (bug or feature?).
+#
 install :: package.conf.installed
-       $(GHC_PKG) --update-package <package.conf.installed
+       pkglibdir=$(libdir) $(GHC_PKG) --force --update-package <package.conf.installed
 
 endif # $(STANDALONE_PACKAGE)
 
@@ -220,6 +224,8 @@ $(HTML_DOC) : $(HS_PPS)
                $(foreach pkg, $(PACKAGE_DEPS), \
                   --read-interface=../$(pkg),../$(pkg)/$(pkg).haddock)
 
+CLEAN_FILES += $(PACKAGE).haddock
+
 %.raw-hs : %.lhs
        $(GHC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@