diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | ghc.mk | 4 | ||||
-rw-r--r-- | libraries/gen_contents_index | 31 | ||||
-rw-r--r-- | mk/validate-settings.mk | 4 | ||||
-rw-r--r-- | utils/ghc-cabal/ghc.mk | 10 | ||||
-rw-r--r-- | utils/ghc-pkg/ghc.mk | 2 |
6 files changed, 32 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index aec9c8857a..c80c32c76f 100644 --- a/configure.ac +++ b/configure.ac @@ -777,7 +777,7 @@ AC_SUBST(BUILD_DOCBOOK_PS) AC_SUBST(BUILD_DOCBOOK_PDF) LIBRARY_VERSION(base) -LIBRARY_VERSION(Cabal, Cabal/cabal) +LIBRARY_VERSION(Cabal, Cabal/Cabal) LIBRARY_VERSION(ghc-prim) LIBRARY_ghc_VERSION="$ProjectVersion" AC_SUBST(LIBRARY_ghc_VERSION) @@ -332,7 +332,7 @@ PKGS_THAT_USE_TH := $(PKGS_THAT_ARE_DPH) # # We assume that the stage0 compiler has a suitable bytestring package, # 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 # not installed @@ -413,7 +413,7 @@ $(eval $(call addPackage,haskell2010)) $(eval $(call addPackage,hpc)) $(eval $(call addPackage,pretty)) $(eval $(call addPackage,template-haskell)) -$(eval $(call addPackage,Cabal/cabal)) +$(eval $(call addPackage,Cabal/Cabal)) $(eval $(call addPackage,binary)) $(eval $(call addPackage,bin-package-db)) $(eval $(call addPackage,hoopl)) diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index bfdf962bf4..c8d82c8da6 100644 --- a/libraries/gen_contents_index +++ b/libraries/gen_contents_index @@ -7,19 +7,30 @@ HADDOCK_ARGS= case $* in --inplace) 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 - HADDOCK_FILE="$LIB/dist-install/doc/html/$LIB/$LIB.haddock" - if [ -f "$HADDOCK_FILE" ] + if [ -f "$REPO/ghc-packages" ] 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" + LIBS="`cat $REPO/ghc-packages`" + LIBROOT="$REPO" + else + LIBS="$REPO" + LIBROOT="." 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 ;; *) diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk index 00d465708a..f0d8de1a2a 100644 --- a/mk/validate-settings.mk +++ b/mk/validate-settings.mk @@ -56,8 +56,8 @@ endif # Cabal doesn't promise to be warning-free utils/ghc-cabal_dist_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-boot_EXTRA_HC_OPTS += -w +libraries/Cabal/Cabal_dist-install_EXTRA_HC_OPTS += -w # Temporarily turn off incomplete-pattern warnings for containers libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-incomplete-patterns diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index 39a26f07d3..9af611c8b9 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -14,16 +14,16 @@ # Euch, hideous hack: # 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_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)" $(GHC_CABAL_INPLACE) : $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/. "$(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)" $(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 | $ -DCABAL_VERSION=$(CABAL_VERSION) \ -odir bootstrapping \ -hidir bootstrapping \ - -ilibraries/Cabal/cabal \ + -ilibraries/Cabal/Cabal \ -ilibraries/filepath \ -ilibraries/hpc \ $(utils/ghc-cabal_dist_EXTRA_HC_OPTS) diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk index 45b91d6e39..f4205479ea 100644 --- a/utils/ghc-pkg/ghc.mk +++ b/utils/ghc-pkg/ghc.mk @@ -61,7 +61,7 @@ utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main -hidir bootstrapping \ -iutils/ghc-pkg \ -XCPP -XExistentialQuantification -XDeriveDataTypeable \ - -ilibraries/Cabal/cabal \ + -ilibraries/Cabal/Cabal \ -ilibraries/filepath \ -ilibraries/extensible-exceptions \ -ilibraries/hpc \ |