[project @ 2006-01-04 12:49:38 by simonmar]
[ghc-hetmet.git] / mk / package.mk
index b0841ba..a2794ab 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: package.mk,v 1.52 2005/03/29 14:06:02 simonmar Exp $
+# $Id: package.mk,v 1.55 2005/05/13 10:05:33 krasimir Exp $
 
 ifneq "$(PACKAGE)" ""
 
@@ -184,7 +184,9 @@ ifeq "$(NON_HS_PACKAGE)" ""
 SRC_HC_OPTS    += -fgenerics
 endif
 
+ifndef LIBRARY
 LIBRARY        = libHS$(PACKAGE)$(_way).a
+endif
 
 ifeq "$(WAYS)" ""
 WAYS = $(GhcLibWays)
@@ -276,7 +278,9 @@ ifneq "$(LIBRARY)" ""
 ifeq "$(way)" ""
 ifeq "$(GhcWithInterpreter)" "YES"
 
+ifndef GHCI_LIBRARY
 GHCI_LIBRARY = $(patsubst lib%.a,%.o,$(LIBRARY))
+endif
 
 ifneq "$(NO_INSTALL_LIBRARY)" "YES"
 INSTALL_LIBS += $(GHCI_LIBRARY)
@@ -357,7 +361,7 @@ ifneq "$(NO_HADDOCK_DOCS)" "YES"
 
 HS_PPS = $(addsuffix .raw-hs, $(basename $(filter-out $(EXCLUDED_HADDOCK_SRCS), $(HS_SRCS))))
 
-HTML_DIR = html
+HTML_DIR = ../html/$(PACKAGE)
 HTML_DOC = $(HTML_DIR)/haddock.css $(HTML_DIR)/haddock.js
 
 ifneq "$(HS_PPS)" ""
@@ -398,11 +402,11 @@ HTML_INSTALL_DIR = $(datadir)/html/libraries/$(PACKAGE)
 
 install-docs :: $(HTML_DOC)
        @$(INSTALL_DIR) $(HTML_INSTALL_DIR)
-       @for i in $(HTML_DIR)/*; do \
-          echo $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
-          $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
-       done
-       $(INSTALL_DATA) $(INSTALL_OPTS) $(PACKAGE).haddock $(HTML_INSTALL_DIR)
+       for i in $(HTML_DIR)/*; do \
+         echo $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
+         $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
+       done; \
+       $(INSTALL_DATA) $(INSTALL_OPTS) $(PACKAGE).haddock $(HTML_INSTALL_DIR); \
 
 endif # HS_PPS
 endif # NO_HADDOCK_DOCS