Remove redundant fromIntegral calls
[ghc-hetmet.git] / mk / package.mk
index 16325dc..44087aa 100644 (file)
@@ -84,7 +84,7 @@ install::
               -x c $(PACKAGE_CPP_OPTS) package.conf.in \
            | grep -v '^#pragma GCC' \
            | sed -e 's/""//g' -e 's/:[   ]*,/: /g' \
-           | $(bindir)/ghc-pkg update - --force
+           | $(GHC_PKG_PROG) --global-conf $(DESTDIR)$(libdir)/package.conf update - --force
 
 # we could be more accurate here and add a dependency on
 # driver/package.conf, but that doesn't work too well because of
@@ -120,6 +120,7 @@ SRC_HSC2HS_OPTS += -I.
 
 ifneq "$(NO_SET_HC)" "YES"
 HC = $(GHC_INPLACE)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS =
 endif
 IGNORE_PACKAGE_FLAG = -package-name  $(PACKAGE)-$(VERSION)
 
@@ -129,12 +130,12 @@ SRC_HC_OPTS       += $(GhcLibHcOpts)
 SRC_HC_OPTS     += $(patsubst %, -package %, $(PACKAGE_DEPS))
 endif
 
-#      -fgenerics switches on generation of support code for 
+#      -XGenerics switches on generation of support code for 
 #              derivable type classes.  This is now off by default,
 #              but we switch it on for the libraries so that we generate
 #              the code in case someone importing wants it.
 ifeq "$(NON_HS_PACKAGE)" ""
-SRC_HC_OPTS    += -fgenerics
+SRC_HC_OPTS    += -XGenerics
 endif
 
 ifndef LIBRARY
@@ -279,19 +280,13 @@ html :: $(HTML_DOC)
 extraclean :: 
        $(RM) -rf $(HTML_DIR)
 
-ifneq "$(findstring $(PACKAGE), $(CorePackages))" ""
-HaddockSourceURL = $(CorePackageSourceURL)
-else
-HaddockSourceURL = $(ExtraPackageSourceURL)
-endif
-
 $(HTML_DOC) : $(HS_PPS)
        @$(INSTALL_DIR) $(HTML_DIR)
        $(HADDOCK) $(HADDOCK_OPTS) -h -o $(HTML_DIR) $(HS_PPS) \
                --package=$(PACKAGE) \
                --dump-interface=$(PACKAGE).haddock \
                --use-index=../doc-index.html --use-contents=../index.html \
-               --source-module=$(HaddockSourceURL) \
+               --source-module=$(PackageSourceURL) \
                $(foreach pkg, $(PACKAGE_DEPS), \
                   --read-interface=../$(pkg),../$(pkg)/$(pkg).haddock)
 
@@ -303,7 +298,7 @@ CLEAN_FILES += $(PACKAGE).haddock
 %.raw-hs : %.hs
        $(HC) $(HC_OPTS) -D__HADDOCK__ -E $< -o $@
 
-HTML_INSTALL_DIR = $(datadir)/html/libraries/$(PACKAGE)
+HTML_INSTALL_DIR = $(DESTDIR)$(htmldir)/libraries/html/$(PACKAGE)
 
 install-docs :: $(HTML_DOC)
        @$(INSTALL_DIR) $(HTML_INSTALL_DIR)