Reorganisation of the source tree
[ghc-hetmet.git] / mk / package.mk
index 7e2cd0a..fbabfeb 100644 (file)
@@ -1,15 +1,10 @@
 # -----------------------------------------------------------------------------
-# $Id: package.mk,v 1.53 2005/04/15 18:13:34 sof Exp $
+# $Id: package.mk,v 1.55 2005/05/13 10:05:33 krasimir Exp $
 
 ifneq "$(PACKAGE)" ""
 
-ifeq "$(STANDALONE_PACKAGE)" ""
-ifeq "$(ProjectNameShort)" "ghc"
+# FIXME: does anyone do this any more?
 STANDALONE_PACKAGE = NO
-else
-STANDALONE_PACKAGE = YES
-endif
-endif
 
 # -----------------------------------------------------------------------------
 # Directory layouts, installation etc.
@@ -104,7 +99,7 @@ package.conf.installed : package.conf.in
        sed -e 's/""//g' -e 's/:[       ]*,/: /g' >$@
 
 # we could be more accurate here and add a dependency on
-# ghc/driver/package.conf, but that doesn't work too well because of
+# driver/package.conf, but that doesn't work too well because of
 # make's limited accuracy with modification times: when doing 'make
 # boot' in multiple packages, make won't detect that the package
 # configuration needs updating if it was updated already in the last
@@ -359,9 +354,9 @@ endif # $(LIBRARY) /= ""
 ifneq "$(PACKAGE)" ""
 ifneq "$(NO_HADDOCK_DOCS)" "YES"
 
-HS_PPS = $(addsuffix .raw-hs, $(basename $(filter-out $(EXCLUDED_HADDOCK_SRCS), $(HS_SRCS))))
+HS_PPS = $(addsuffix .raw-hs, $(basename $(filter-out $(EXCLUDED_HADDOCK_SRCS), $(HS_SRCS)))) $(EXTRA_HADDOCK_SRCS)
 
-HTML_DIR = html
+HTML_DIR = ../html/$(PACKAGE)
 HTML_DOC = $(HTML_DIR)/haddock.css $(HTML_DIR)/haddock.js
 
 ifneq "$(HS_PPS)" ""
@@ -402,11 +397,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