Commit 3b43e035 authored by Ian Lynagh's avatar Ian Lynagh

Follow cabal->Cabal rename, and fix haddock index generation

We now make use of the ghc-packages file when making the haddock index.
parent f6765041
...@@ -777,7 +777,7 @@ AC_SUBST(BUILD_DOCBOOK_PS) ...@@ -777,7 +777,7 @@ AC_SUBST(BUILD_DOCBOOK_PS)
AC_SUBST(BUILD_DOCBOOK_PDF) AC_SUBST(BUILD_DOCBOOK_PDF)
LIBRARY_VERSION(base) LIBRARY_VERSION(base)
LIBRARY_VERSION(Cabal, Cabal/cabal) LIBRARY_VERSION(Cabal, Cabal/Cabal)
LIBRARY_VERSION(ghc-prim) LIBRARY_VERSION(ghc-prim)
LIBRARY_ghc_VERSION="$ProjectVersion" LIBRARY_ghc_VERSION="$ProjectVersion"
AC_SUBST(LIBRARY_ghc_VERSION) AC_SUBST(LIBRARY_ghc_VERSION)
......
...@@ -332,7 +332,7 @@ PKGS_THAT_USE_TH := $(PKGS_THAT_ARE_DPH) ...@@ -332,7 +332,7 @@ PKGS_THAT_USE_TH := $(PKGS_THAT_ARE_DPH)
# #
# We assume that the stage0 compiler has a suitable bytestring package, # We assume that the stage0 compiler has a suitable bytestring package,
# so we don't have to include it below. # so we don't have to include it below.
PKGS_THAT_BUILD_WITH_STAGE0 = Cabal/cabal hpc extensible-exceptions binary bin-package-db hoopl PKGS_THAT_BUILD_WITH_STAGE0 = Cabal/Cabal hpc extensible-exceptions binary bin-package-db hoopl
# $(EXTRA_PACKAGES) is another classification, of packages built but # $(EXTRA_PACKAGES) is another classification, of packages built but
# not installed # not installed
...@@ -413,7 +413,7 @@ $(eval $(call addPackage,haskell2010)) ...@@ -413,7 +413,7 @@ $(eval $(call addPackage,haskell2010))
$(eval $(call addPackage,hpc)) $(eval $(call addPackage,hpc))
$(eval $(call addPackage,pretty)) $(eval $(call addPackage,pretty))
$(eval $(call addPackage,template-haskell)) $(eval $(call addPackage,template-haskell))
$(eval $(call addPackage,Cabal/cabal)) $(eval $(call addPackage,Cabal/Cabal))
$(eval $(call addPackage,binary)) $(eval $(call addPackage,binary))
$(eval $(call addPackage,bin-package-db)) $(eval $(call addPackage,bin-package-db))
$(eval $(call addPackage,hoopl)) $(eval $(call addPackage,hoopl))
......
...@@ -7,19 +7,30 @@ HADDOCK_ARGS= ...@@ -7,19 +7,30 @@ HADDOCK_ARGS=
case $* in case $* in
--inplace) --inplace)
HADDOCK=../inplace/bin/haddock HADDOCK=../inplace/bin/haddock
for LIB in `grep '^libraries/[^ ]* *- ' ../packages | sed -e 's#libraries/##' -e 's/ .*//'` for REPO in `grep '^libraries/[^ ]* *- ' ../packages | sed -e 's#libraries/##' -e 's/ .*//'`
do do
HADDOCK_FILE="$LIB/dist-install/doc/html/$LIB/$LIB.haddock" if [ -f "$REPO/ghc-packages" ]
if [ -f "$HADDOCK_FILE" ]
then then
LIBPATH=`echo "$HADDOCK_FILE" | sed 's#/dist-install.*##'` LIBS="`cat $REPO/ghc-packages`"
NAME=`echo "$HADDOCK_FILE" | sed 's#.*/##' | sed 's#\.haddock$##'` LIBROOT="$REPO"
# It's easier to portably remove tabs with tr than to try to get else
# sed to do what we want LIBS="$REPO"
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*://' | tr -d ' \t'` LIBROOT="."
HADDOCK_ARG="--read-interface=${NAME}-${VERSION},$HADDOCK_FILE"
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
fi fi
for LIB in $LIBS
do
HADDOCK_FILE="$LIBROOT/$LIB/dist-install/doc/html/$LIB/$LIB.haddock"
if [ -f "$HADDOCK_FILE" ]
then
LIBPATH=`echo "$HADDOCK_FILE" | sed 's#/dist-install.*##'`
NAME=`echo "$HADDOCK_FILE" | sed 's#.*/##' | sed 's#\.haddock$##'`
# It's easier to portably remove tabs with tr than to try to get
# sed to do what we want
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*://' | tr -d ' \t'`
HADDOCK_ARG="--read-interface=${NAME}-${VERSION},$HADDOCK_FILE"
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
fi
done
done done
;; ;;
*) *)
......
...@@ -56,8 +56,8 @@ endif ...@@ -56,8 +56,8 @@ endif
# Cabal doesn't promise to be warning-free # Cabal doesn't promise to be warning-free
utils/ghc-cabal_dist_EXTRA_HC_OPTS += -w utils/ghc-cabal_dist_EXTRA_HC_OPTS += -w
libraries/Cabal/cabal_dist-boot_EXTRA_HC_OPTS += -w libraries/Cabal/Cabal_dist-boot_EXTRA_HC_OPTS += -w
libraries/Cabal/cabal_dist-install_EXTRA_HC_OPTS += -w libraries/Cabal/Cabal_dist-install_EXTRA_HC_OPTS += -w
# Temporarily turn off incomplete-pattern warnings for containers # Temporarily turn off incomplete-pattern warnings for containers
libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-incomplete-patterns libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-incomplete-patterns
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
# Euch, hideous hack: # Euch, hideous hack:
# XXX This should be in a different Makefile # XXX This should be in a different Makefile
CABAL_DOTTED_VERSION := $(shell grep "^Version:" libraries/Cabal/cabal/Cabal.cabal | sed "s/^Version: //") CABAL_DOTTED_VERSION := $(shell grep "^Version:" libraries/Cabal/Cabal/Cabal.cabal | sed "s/^Version: //")
CABAL_VERSION := $(subst .,$(comma),$(CABAL_DOTTED_VERSION)) CABAL_VERSION := $(subst .,$(comma),$(CABAL_DOTTED_VERSION))
CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)" CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)"
$(GHC_CABAL_INPLACE) : $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/. $(GHC_CABAL_INPLACE) : $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/.
"$(CP)" $< $@ "$(CP)" $< $@
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/cabal/Distribution/*/*/*.hs) $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Cabal/Distribution/*/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/cabal/Distribution/*/*.hs) $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Cabal/Distribution/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/cabal/Distribution/*.hs) $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Cabal/Distribution/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/Main.hs | $$(dir $$@)/. bootstrapping/. $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/Main.hs | $$(dir $$@)/. bootstrapping/.
"$(GHC)" $(SRC_HC_OPTS) --make $(GHC_CABAL_DIR)/Main.hs -o $@ \ "$(GHC)" $(SRC_HC_OPTS) --make $(GHC_CABAL_DIR)/Main.hs -o $@ \
...@@ -32,7 +32,7 @@ $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/Main.hs | $ ...@@ -32,7 +32,7 @@ $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/Main.hs | $
-DCABAL_VERSION=$(CABAL_VERSION) \ -DCABAL_VERSION=$(CABAL_VERSION) \
-odir bootstrapping \ -odir bootstrapping \
-hidir bootstrapping \ -hidir bootstrapping \
-ilibraries/Cabal/cabal \ -ilibraries/Cabal/Cabal \
-ilibraries/filepath \ -ilibraries/filepath \
-ilibraries/hpc \ -ilibraries/hpc \
$(utils/ghc-cabal_dist_EXTRA_HC_OPTS) $(utils/ghc-cabal_dist_EXTRA_HC_OPTS)
......
...@@ -61,7 +61,7 @@ utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main ...@@ -61,7 +61,7 @@ utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main
-hidir bootstrapping \ -hidir bootstrapping \
-iutils/ghc-pkg \ -iutils/ghc-pkg \
-XCPP -XExistentialQuantification -XDeriveDataTypeable \ -XCPP -XExistentialQuantification -XDeriveDataTypeable \
-ilibraries/Cabal/cabal \ -ilibraries/Cabal/Cabal \
-ilibraries/filepath \ -ilibraries/filepath \
-ilibraries/extensible-exceptions \ -ilibraries/extensible-exceptions \
-ilibraries/hpc \ -ilibraries/hpc \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment