summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-10-26 12:24:56 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-10-26 12:24:56 +0000
commitf9c199a1a2865bdb9e8fb318a48058d7e4bfaf64 (patch)
tree2ccd91b1d7eee0025421a4388aa415c0d2997e10
parentd59e5356ca49548f9a3e51e03742adec72356a94 (diff)
downloadhaskell-f9c199a1a2865bdb9e8fb318a48058d7e4bfaf64.tar.gz
install the Cabal docs, and make them show up in a binary distribution
-rw-r--r--Makefile5
-rw-r--r--distrib/Makefile1
-rw-r--r--mk/install.mk14
3 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index c079170bb4..0fbd8cac18 100644
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ else
SUBDIRS_BUILD = gmp includes compat utils driver docs compiler rts
endif
-SUBDIRS = gmp includes compat utils driver docs rts libraries compiler
+SUBDIRS = gmp includes compat utils driver docs rts libraries compiler libraries/Cabal/doc
# Sanity check that all the boot libraries are in the tree, to catch
# failure to run darcs-all.
@@ -309,6 +309,7 @@ binary-dist::
$(MAKE) -C utils binary-dist DOING_BIN_DIST=YES
$(MAKE) -C docs binary-dist DOING_BIN_DIST=YES
$(MAKE) -C libraries binary-dist DOING_BIN_DIST=YES
+ $(MAKE) -C libraries/Cabal/doc binary-dist DOING_BIN_DIST=YES
VARFILE=$(BIN_DIST_DIR)/Makefile-vars.in
@@ -419,7 +420,7 @@ SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAME)
#
# Files to include in source distributions
#
-SRC_DIST_DIRS += mk docs distrib bindisttest $(filter-out docs distrib,$(SUBDIRS))
+SRC_DIST_DIRS += mk docs distrib bindisttest $(filter-out docs distrib libraries/Cabal/doc,$(SUBDIRS))
SRC_DIST_FILES += \
configure.ac config.guess config.sub configure \
aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
diff --git a/distrib/Makefile b/distrib/Makefile
index adf39ac1fd..64863e2fba 100644
--- a/distrib/Makefile
+++ b/distrib/Makefile
@@ -25,6 +25,7 @@ install::
$(MAKE) -C libraries install DOING_BIN_DIST=YES
$(MAKE) -C compiler install DOING_BIN_DIST=YES
$(MAKE) -C docs install-docs DOING_BIN_DIST=YES
+ $(MAKE) -C libraries/Cabal/doc install-docs DOING_BIN_DIST=YES
$(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
install :: postinstall denounce
diff --git a/mk/install.mk b/mk/install.mk
index d2e8d030a4..dd8dfc4946 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -266,9 +266,13 @@ endif
endif
ifneq "$(strip $(INSTALL_XML_DOC))" ""
+ifeq "$(DOC_SUBDIR)" ""
+DOC_SUBDIR=docs/$(XML_DOC)
+endif
+
binary-dist::
- $(MKDIRHIER) $(BIN_DIST_DIR)/docs/$(XML_DOC)
- $(CP) Makefile $(BIN_DIST_DIR)/docs/$(XML_DOC)
+ $(MKDIRHIER) $(BIN_DIST_DIR)/$(DOC_SUBDIR)
+ $(CP) Makefile $(BIN_DIST_DIR)/$(DOC_SUBDIR)
ifneq "$(XMLDocWays)" ""
# TODO: The following could be an entry for an Obfuscated Makefile Contest...
@@ -295,13 +299,13 @@ binary-dist:: $(foreach i,$(XMLDocWays),$(INSTALL_XML_DOC)$(patsubst %.html-no-c
binary-dist:: $(foreach i,$(XMLDocWays),binary-dist-docs-$i)
binary-dist-docs-html:
- $(CP) -r $(INSTALL_XML_DOC) $(BIN_DIST_DIR)/docs/$(XML_DOC)/
+ $(CP) -r $(INSTALL_XML_DOC) $(BIN_DIST_DIR)/$(DOC_SUBDIR)
binary-dist-docs-html-no-chunks:
- $(CP) $(INSTALL_XML_DOC).html $(BIN_DIST_DIR)/docs/$(XML_DOC)/
+ $(CP) $(INSTALL_XML_DOC).html $(BIN_DIST_DIR)/$(DOC_SUBDIR)/
binary-dist-docs-%:
- $(CP) $(INSTALL_XML_DOC).$* $(BIN_DIST_DIR)/docs/$(XML_DOC)/
+ $(CP) $(INSTALL_XML_DOC).$* $(BIN_DIST_DIR)/$(DOC_SUBDIR)/
endif
endif