-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
%.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)